HTTP

Description

Make HTTP requests to URLs such as REST APIs, Webhooks, etc.

Component key: http

Authorization Methods

HTTP can use the following authorization methods, though no authorization method is required.

KeyNameDescription
basicBasic AuthBasic authorization using a username/password combination
oauth2OAuth 2.0OAuth 2.0 authorization using an OAuth 2 flow

Actions

DELETE request

Issue a HTTP DELETE request

Action key: httpDelete

Inputs

KeyTypeDefaultRequiredComments
headersSTRINGNoneFalseHeaders to send with the request
queryParamsSTRINGNoneFalseQuery Parameters to send with the request
responseTypeSTRINGjsonFalseSpecifies the type of data you expect in the response. Can be 'json', 'text', or 'binary'.
urlSTRINGNoneTrueURL to call

GET Request

Issue a HTTP GET request

Action key: httpGet

Inputs

KeyTypeDefaultRequiredComments
headersSTRINGNoneFalseHeaders to send with the request
queryParamsSTRINGNoneFalseQuery Parameters to send with the request
responseTypeSTRINGjsonFalseSpecifies the type of data you expect in the response. Can be 'json', 'text', or 'binary'.
urlSTRINGNoneTrueURL to call
# Get a list of "To Do" items and output a random "To Do" task
HTTP_GET_ACTION_ID=$(prism components:actions:list --filter 'key=httpGet' --columns id --no-header)
INPUTS='[
{
"name": "url",
"expression": "'"'"'https://jsonplaceholder.typicode.com/todos'"'"'"
}
]'
OUTPUTS='[
{
"name": "todoItemId",
"expression": "$shuffle(*)[0].id"
}
]'
prism integrations:steps:add ${HTTP_GET_ACTION_ID} \
--integration ${INTEGRATION_ID} \
--inputs ${INPUTS} \
--outputs ${OUTPUTS}

PATCH request

Issue a HTTP PATCH request

Action key: httpPatch

Inputs

KeyTypeDefaultRequiredComments
dataSTRINGNoneTrueData to send to url. Must be a string literal or a path to an output from a previous step.
headersSTRINGNoneFalseHeaders to send with the request
queryParamsSTRINGNoneFalseQuery Parameters to send with the request
responseTypeSTRINGjsonFalseSpecifies the type of data you expect in the response. Can be 'json', 'text', or 'binary'.
urlSTRINGNoneTrueURL to call

POST Request

Issue a HTTP POST request

Action key: httpPost

Inputs

KeyTypeDefaultRequiredComments
dataSTRINGNoneTrueData to send to url. Must be a string literal or a path to an output from a previous step.
headersSTRINGNoneFalseHeaders to send with the request
queryParamsSTRINGNoneFalseQuery Parameters to send with the request
responseTypeSTRINGjsonFalseSpecifies the type of data you expect in the response. Can be 'json', 'text', or 'binary'.
urlSTRINGNoneTrueURL to call

PUT request

Issue a HTTP PUT request

Action key: httpPut

Inputs

KeyTypeDefaultRequiredComments
dataSTRINGNoneTrueData to send to url. Must be a string literal or a path to an output from a previous step.
headersSTRINGNoneFalseHeaders to send with the request
queryParamsSTRINGNoneFalseQuery Parameters to send with the request
responseTypeSTRINGjsonFalseSpecifies the type of data you expect in the response. Can be 'json', 'text', or 'binary'.
urlSTRINGNoneTrueURL to call
Last updated on