Query the status of a task

Updated

Queries the status of a Cloud Transcoding task.

GET
https://api.sd-rtn.com/v1/projects/{appId}/rtsc/cloud-transcoder/tasks/{taskId}

After creating a Cloud Transcoding task, use the Query request to query the task status.

Path Parameters

appIdstring
Required

The App ID of your project from Agora Console.

taskIdstring
Required

The transcoding task UUID used to identify the cloud transcoder for this request.

Query Parameters

builderTokenstring
Required

The tokenName you obtained in the response body of the Acquire method. See Acquire a builder token.

Header Parameters

Content-Typestring
Required

The request content type. Use application/json.

X-Request-IDstring

UUID (Universally Unique Identifier), used to identify this request.

If the request fails, print out the value in the log to troubleshoot the problem. If the response status code of the request is not 2XX, then the response header may not contain this field.

Response

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

  • If the returned status code is not 200, the request failed.

Response Body

The request succeeded and returned task status.

Response Headers

X-Request-IDstring

The unique request ID. If the request fails, use this value in the log to troubleshoot the problem.

taskIdstring

A UUID used to identify the cloud transcoder for this request operation.

createTsnumber

Unix timestamp (seconds) when the transcoding task was created.

statusstring

The running status of the transcoding task:

  • "IDLE": Task not started.
  • "PREPARED": The task has received a start request.
  • "STARTING": The task is starting.
  • "CREATED": Task initialization completed.
  • "STARTED": The task has started.
  • "IN_PROGRESS": Task in progress.
  • "STOPPING": The task is stopping.
  • "STOPPED": The task has stopped.
  • "EXIT": The task exited normally.
  • "FAILURE_STOP": The task exited abnormally.
sequenceIdstring

The sequence ID.

servicesobject
eventHandlersobject
executionobject
propertiesobject
variablesobject
workflowsobject

Reference

To understand the difference between query methods and message notification service, see What's the difference between query methods and message notification service?.

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request get \      --url 'https://api.sd-rtn.com/v1/projects/:appId/rtsc/cloud-transcoder/tasks/:taskId?builderToken=<actual_token_value>' \      --header 'Authorization: Basic <credentials>' \      --header 'Content-Type: <string>'

Response example

{  "createTs": 1661420011,  "eventHandlers": {},  "execution": {    "workflows": {}  },  "properties": {},  "sequenceId": "0",  "services": {    "cloudTranscoder": {      "config": {},      "createTs": 1661420011,      "message": "OnSlaveServiceQueryUpdated",      "serviceType": "cloudTranscoderV2",      "status": "serviceInProgress"    }  },  "status": "IN_PROGRESS",  "taskId": "c0077139e34d0949c719189a393aa***",  "variables": {},  "workflows": {}}