Skip to main content

invoke-url

This task transfers data to an external system via an HTTP request.

Parameters

  • url (string) - The address to which we send the request.
  • body (object) - Defines the request body.
  • httpMethod (string) - (optional) The method of the HTTP request, one of "GET", "POST", "PUT", or "DELETE". If not provided, "POST" will be used by default.
  • queryHeaders (object) - Arbitrary headers passed as a set of key-value pairs.
  • queryParameters (object) - Arbitrary query parameters passed as a set of key-value pairs.
note

We do not expect any response.

We can add arbitrary request headers.

These parameters support argument interpolation following the common rules.

Example

{
"description": "Register print files with previews",
"name": "register",
"type": "invoke-url",
"inputArtifacts": [
"result*",
"preview-front",
"preview-back"
],
"parameters": {
"url": "https://example.com/",
"httpMethod": "GET",
"queryHeaders": {
"accept": "application/json",
"apiKeyHeader": "apikey",
"someRandomHeader": "someRandomValue"
},
"queryParameters": {
"projectId": "{{project.id}}",
"sort": "descending"
},
"body": {
"Id": "{{project.id}}",
"front": {
"file": "{{result1}}",
"preview": "{{preview-front?}}"
},
"back": {
"file": "{{result2}}",
"preview": "{{preview-back?}}"
}
}
}
}
Was this page helpful?