Python SDK
Last updated
Last updated
This Task triggers and listens for updates for a workflow running in a piece of third-party infrastructure. Updates are sent via webhook events back to Orchestra. This can be achieved using the Orchestra Python SDK or by explicitly sending HTTP requests to the Orchestra webhook endpoint (see for more details).
Generally, HTTP Requests are helpful for triggering processes in external systems using Orchestra. Often, these are requests to alerting services or requests to metadata microservices that collate data upon completion of a task.
In Orchestra, we aim to provide this functionality "out-the-box", but we of course understand the need for interoperability and therefore have a HTTP Request option for edge-cases where we cannot support the use-case natively.
This job supports long running workflows by waiting for a webhook event to complete the task. This requires some minimal code changes in your workflow to send the webhook event on completion/failure. The Orchestra Python SDK is available to help wrap the webhook event trigger in your code.
These parameters are required to run the Request Task
Path
String
/endpoint
Method
String
GET, POST, PUT
JSON Body
Json
Well-formatted JSON
To send the webhook event to Orchestra to complete the task, you need the Task Run ID. This will be included as a request header orchestra_task_run_id
in the HTTP request.
Orchestra will fail the Task if the response code isn't a 2xx code.
401
Unauthorised
We will raise an error and parse the raw error message from the Render response as the Orchestra message
404
Not Found
We will raise an error with the HTTP Reason as the Orchestra message
Other error code
We will raise an error with the HTTP Reason as the Orchestra message
We do not expect the process start trigger to "take a long time". Therefore HTTP requests will timeout (and the Task, and Pipeline) will fail if the request takes more than 30 seconds. There is currently no limit on how long we wait for the webhook event to complete the task. You will need to manually cancel the task if the webhook message to succeed or fail the task is not successfully sent.