REST
Last updated
{
"url": "https://www.example.com/{{parameters.url}}"
}{
"name": "url",
"type": "text",
"label": "URL",
"help": "Enter a path relative to `https://www.example.com`. For example: `/v1/something`",
"required": true
}{
"url": "https://www.example.com/v1/{{parameters.url}}"
}{
"name": "url",
"type": "text",
"label": "URL",
"help": "Enter a path relative to `https://www.example.com/v1/`. For example: `something`",
"required": true
}{
"qs": {
"{{...}}": "{{toCollection(parameters.qs, 'key', 'value')}}"
},
"url": "https://www.example.com/{{parameters.url}}",
"body": "{{parameters.body}}",
"type": "text",
"method": "{{parameters.method}}",
"headers": {
"{{...}}": "{{toCollection(parameters.headers, 'key', 'value')}}"
},
"response": {
"output": {
"body": "{{body}}",
"headers": "{{headers}}",
"statusCode": "{{statusCode}}"
}
}
}[][
{
"help": "Enter a path relative to `https://www.example.com`.\nFor example: `/v1/api/list`",
"name": "url",
"type": "text",
"label": "URL",
"required": true
},
{
"name": "method",
"type": "select",
"label": "Method",
"default": "GET",
"options": [
{
"label": "GET",
"value": "GET"
},
{
"label": "POST",
"value": "POST"
},
{
"label": "PUT",
"value": "PUT"
},
{
"label": "PATCH",
"value": "PATCH"
},
{
"label": "DELETE",
"value": "DELETE"
}
],
"required": true
},
{
"help": "You don't have to add authorization headers; we already did that for you.",
"name": "headers",
"spec": [
{
"name": "key",
"type": "text",
"label": "Key"
},
{
"name": "value",
"type": "text",
"label": "Value"
}
],
"type": "array",
"label": "Headers",
"default": [
{
"key": "Content-Type",
"value": "application/json"
}
]
},
{
"name": "qs",
"spec": [
{
"name": "key",
"type": "text",
"label": "Key"
},
{
"name": "value",
"type": "text",
"label": "Value"
}
],
"type": "array",
"label": "Query String"
},
{
"name": "body",
"type": "any",
"label": "Body"
}
][
{
"name": "body",
"type": "any",
"label": "Body"
},
{
"name": "headers",
"type": "collection",
"label": "Headers"
},
{
"name": "statusCode",
"type": "number",
"label": "Status code"
}
]{}[
{
"name": "clientId",
"type": "text",
"label": "Client ID",
"advanced": true
},
{
"name": "clientSecret",
"type": "text",
"label": "Client Secret",
"advanced": true
},
{
"name": "scopes",
"label": "Additional Scopes",
"type": "array",
"help": "Use this to get an access to extra scopes.",
"advanced": true
}
]"authorize": {
"qs": {
"scope": "{{join(distinct(merge(oauth.scope, ifempty(parameters.scopes, emptyarray))), ',')}}",
"client_id": "{{common.clientId}}",
"redirect_uri": "{{oauth.redirectUri}}",
"response_type": "code"
},
"url": "...",
"response": {
"temp": {
"code": "{{query.code}}"
}
}
}