Skip to main content

task-api

Trigger an asynchronous execution of a task

Compute API

Version: 1.0.5

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

api-previewstring | null

org_iduuid
Required
topicstring
Required
taskstring
Required

This schema accepts user-defined additional properties along with the documented schema. The additional properties must match the specified type where one is provided.

{
"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.

undefinedunknown

Endpoint

POST
/compute/orgs/{org_id}/{topic}/{task}

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

Version: 1.0.5

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

api-previewstring | null

org_iduuid
Required
run_iduuid
Required
topicstring
Required
taskstring
Required

Returns

200

The status of a completed job, which includes the job's status and a link to the results.

status"requested" | "in progress" | "cancelling" | "succeeded" | "failed" | "cancelled"
progressinteger

Range: [0, 100]

messagestring | null

detailstring | null
typestring | null
titlestring | null
statusinteger | null
null

resultstring

cancelstring

Endpoint

GET
/compute/orgs/{org_id}/{topic}/{task}/{run_id}/status

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

Version: 1.0.5

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

api-previewstring | null

org_iduuid
Required
run_iduuid
Required
topicstring
Required
taskstring
Required

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.

status"requested" | "in progress" | "cancelling" | "succeeded" | "failed" | "cancelled"

detailstring | null
typestring | null
titlestring | null
statusinteger | null
null

null

Endpoint

GET
/compute/orgs/{org_id}/{topic}/{task}/{run_id}

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

Version: 1.0.5

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

api-previewstring | null

org_iduuid
Required
run_iduuid
Required
topicstring
Required
taskstring
Required

Returns

204

Successful Response

Endpoint

DELETE
/compute/orgs/{org_id}/{topic}/{task}/{run_id}

Request

curl -X DELETE 'https://{service_host}/compute/orgs/{org_id}/{topic}/{task}/{run_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Response

No response body.

Was this page helpful?