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 Workflows Templates.
For downloading large files, we recommend using the HTTP - Download File from URL Blueprint.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Method |
HTTP_METHOD |
Select |
✅ |
GET |
GET
|
Request method to use against the URL. Workflows supports GET, POST, PUT, and PATCH. |
|
URL |
HTTP_URL |
Alphanumeric |
✅ |
None |
- |
URL to run a request against. |
|
Content Type |
HTTP_CONTENT_TYPE |
Select |
✅ |
application/json |
application/json
|
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 Header |
HTTP_AUTHORIZATION_HEADER |
Password |
➖ |
None |
- |
Credentials to access an API should be provided in the authorization header. |
|
Message |
HTTP_MESSAGE |
Alphanumeric |
➖ |
None |
- |
The data to be sent to the API. Also known as the body of the request. |
|
Destination Folder Name |
HTTP_DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
None |
- |
The folder where the returned response should be stored. If left blank, defaults to the home directory. |
|
Destination File Name |
HTTP_DESTINATION_FILE_NAME |
Alphanumeric |
✅ |
response.txt |
- |
The name of the file that the response should be generated to. |
|
Print Response to Output? |
HTTP_PRINT_RESPONSE |
Boolean |
✅ |
False |
- |
If checked, the response will be printed to the log output in Workflows. This is only recommended if the output is guaranteed to not have sensitive in it. |
YAML
Below is the YAML template
source:
template: HTTP - Requests
inputs:
HTTP_METHOD: GET
HTTP_URL:
HTTP_CONTENT_TYPE: application/json
HTTP_AUTHORIZATION_HEADER:
HTTP_MESSAGE:
HTTP_DESTINATION_FOLDER_NAME:
HTTP_DESTINATION_FILE_NAME: response.txt
HTTP_PRINT_RESPONSE: false
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 200