Skip to main content

HTTP - Requests

Overview​

Run a GET, POST, PATCH, or PUT request against any URL or API. Useful for working with any external API or service not natively supported by Platform Blueprints.

For downloading large files, we recommend using the HTTP - Download File from URL Blueprint.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
MethodHTTP_METHODSelectβœ…GETGET,POST,PUT,PATCH,Request method to use against the URL. Platform supports GET, POST, PUT, and PATCH.
URLHTTP_URLAlphanumericβœ…--URL to run a request against.
Content TypeHTTP_CONTENT_TYPESelectβœ…application/jsonapplication/json,application/xml,text/plain,text/html,application/x-www-form-urlencoded,The type of content provided by the server. The API you run a request against may state that a specific content-type should be chosen.
Authorization HeaderHTTP_AUTHORIZATION_HEADERPasswordβž–--Credentials to access an API should be provided in the authorization header.
MessageHTTP_MESSAGEAlphanumericβž–--The data to be sent to the API. Also known as the body of the request.
Destination Folder NameHTTP_DESTINATION_FOLDER_NAMEAlphanumericβž–--The folder where the returned response should be stored. If left blank, defaults to the home directory.
Destination File NameHTTP_DESTINATION_FILE_NAMEAlphanumericβœ…response.txt-The name of the file that the response should be generated to.
Print Response to Output?HTTP_PRINT_RESPONSEBooleanβœ…False-If checked, the response will be printed to the log output in Platform. This is only recommended if the output is guaranteed to not have sensitive in it.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: HTTP - Requests
inputs:
HTTP_METHOD: GET ## REQUIRED
HTTP_URL: null ## REQUIRED
HTTP_CONTENT_TYPE: application/json ## REQUIRED
HTTP_AUTHORIZATION_HEADER: null
HTTP_MESSAGE: null
HTTP_DESTINATION_FOLDER_NAME: null
HTTP_DESTINATION_FILE_NAME: response.txt ## REQUIRED
HTTP_PRINT_RESPONSE: false ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '0'