task-api
Trigger an asynchronous execution of a task
Compute API
Trigger an asynchronous task within a specific topic for a designated organization. The task, topic, and organization ID are supplied as path parameters. A JSON request body, referencing the ExecuteRequest schema and containing task-specific parameters, is required for this operation. Upon successful start, a 303 response is returned. The URL of the status endpoint for the newly created run is indicated in the Location header of the response.
Parameters
{
"parameters": {
"additionalProp1": "string",
"additionalProp2": "number",
"additionalProp3": "boolean"
}
}
Returns
303
Successful Response - See Other. The status endpoint URL for the newly created run is provided in the Location header.
Endpoint
Request
curl -X POST 'https://{service_host}/compute/orgs/{org_id}/{topic}/{task}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
No response body.
Retrieve the status of a specific run
Compute API
Gets the status of a specific run, identified by the organization ID, topic, task, and run ID. The run's status is returned in the response, along with a progress indicator, a message, and an error object, if applicable. If the run is ongoing, the response includes links to the run's cancellation endpoint.
Parameters
Returns
200
The status of a completed job, which includes the job's status and a link to the results.
Endpoint
Request
curl -X GET 'https://{service_host}/compute/orgs/{org_id}/{topic}/{task}/{run_id}/status' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"status": "requested",
"progress": 0,
"message": "string",
"error": "string",
"links": {
"result": "string"
}
}
Retrieve the results of a specific run
Compute API
Gets the results of a specific run, identified by the organization ID, topic, task, and run ID. The run's status is returned in the response, along with either the results or an error object, depending on the status of the run. If the run is ongoing, the response includes links to the run's cancellation endpoint and detailed status endpoint.
Parameters
Returns
200
The result for a completed job, which includes the job's status and may also contain either results or an error object, depending on the status of the job.
Endpoint
Request
curl -X GET 'https://{service_host}/compute/orgs/{org_id}/{topic}/{task}/{run_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"status": "requested",
"error": "string",
"results": {
"additionalProp1": "string",
"additionalProp2": "number",
"additionalProp3": "boolean"
}
}
Cancel a specific run
Compute API
Cancels a specific run, identified by the organization ID, topic, task, and run ID. The run's status is updated to 'canceling' and the run is stopped.
Parameters
Returns
204
Successful Response
Endpoint
Request
curl -X DELETE 'https://{service_host}/compute/orgs/{org_id}/{topic}/{task}/{run_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
No response body.