Skip to main content

Query the status of a task

Query the status of a 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.

Request

Path parameters

appId stringrequired

The App ID of your project from Agora Console.

taskId stringrequired

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

Query parameters

builderToken stringrequired

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

Response

Response header

X-Request-ID stringnullable

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 body

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

    OK
    • taskId string

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

    • createTs number

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

    • status string

      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.
    • services object
      Show propertiesHide properties
      • cloudTranscoder object
        Show propertiesHide properties
        • config object

          Same as the fields you set in the Create request body.

        • createTs number

          Unix timestamp (in seconds) when the service was created.

        • details object

          Reserved field.

        • message string

          Reserved field.

        • serviceType string

          Should be "cloudTranscoderV2".

        • status string

          The running status of the transcoding service in the transcoding task:

          • "serviceIdle": The service has not started.
          • "serviceReady": The service is ready to start.
          • "serviceStarted": The service has started.
          • "serviceInProgress": The service is currently running.
          • "serviceCompleted": The service has stopped, and all tasks have been completed.
          • "servicePartialCompleted": The service has stopped, but the task was only partially completed.
          • "serviceValidationFailed": The service failed due to invalid parameters.
          • "serviceAbnormal": The service exited unexpectedly.
          • "serviceUnknown": The service status is unknown.

          This field is meant for the Agora technical team to investigate any issues. You do not need to focus on it.

      • eventHandlers object

        Reserved field.

      • execution object
        Show propertiesHide properties
        • workflows object

          Reserved field.

      • properties object

        Reserved field.

      • sequenceId string

        Reserved field.

      • variables object

        Reserved field.

      • workflows object

        Reserved field.

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

    Non 200
    • message string

      Describes why the request failed.

Reference

Authorization

This endpoint requires Basic Auth.

Request example


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

Response example


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