Update a cloud transcoding task

Updated

Updates an existing Cloud Transcoding task.

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

Use this endpoint to Update a Cloud Transcoding task.

Path Parameters

appId#*string

The App ID of your project from Agora Console.

taskId#*string

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

Query Parameters

builderToken#*string

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

sequenceId#*string

The sequence number of the Update request. Each subsequent Update request must use a value greater than the previous one.

updateMask#*string

Specifies the configuration item to be updated. Set it to services.cloudTranscoder.config to indicate a full update.

Allowedservices.cloudTranscoder.config

Header Parameters

Content-Type#*string

The request content type. Use application/json.

Allowedapplication/json
X-Request-ID#?string

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.

Request

  • When updating a cloud transcoder, the request body must contain all the fields from the Create request in the request body. For fields that you do not need to update, use the original values. See Updatable fields for the Cloud Transcoding parameters you can modify.

Request Body

application/json

services#requiredobject

Response

  • If the returned status code is 2XX, the request was successful. The response body is empty.

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

  • If the request fails, use the X-Request-ID value in the log to troubleshoot the problem. If the response status code is not 2XX, then the response header may not contain this field.

Response Body

application/json

Response schema

200application/json

The request succeeded and the response body is empty.

defaultapplication/json

The request failed.

message#optionalstring

Describes why the request failed.

Response Headers

X-Request-ID#?string

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

Status200

Reference

The Update request supports modifying the following fields only:

  • Add or delete rtc members in audioInputs[] and videoInputs[] to subscribe or unsubscribe from the host's audio and video streams.
  • Modify the region field in videoInputs[] to update the host's combined picture layout.
  • Modify the audioOption and videoOption fields in outputs[] to update the transcoding output audio and video configurations.

Response

See Updatable fields for the Cloud Transcoding parameters you can modify.

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request post \        --url 'https://api.sd-rtn.com/v1/projects/:appId/rtsc/cloud-transcoder/tasks?builderToken=' \        --header 'Authorization: Basic <credentials>' \        --header 'Content-Type: <string>' \        --data '      {        "services": {          "cloudTranscoder": {            "serviceType": "cloudTranscoderV2",            "config": {              "transcoder": {                "idleTimeout": 300,                "audioInputs": [                  {                    "rtc": {                      "rtcChannel": "test01",                      "rtcUid": 123,                      "rtcToken": "aab8b8f5a8cd4469a63042fcfafe7***"                    }                  },                  {                    "rtc": {                      "rtcChannel": "test01",                      "rtcUid": 456,                      "rtcToken": "aab8b8f5a8cd4469a63042fcfafe7***"                    }                  }                ],                "canvas": {                  "width": 960,                  "height": 480,                  "color": 0,                  "backgroundImage": "https://example.jpg",                  "fillMode": "FIT"                },                "waterMarks": [                  {                    "imageUrl": "https://example.png",                    "region": {                      "x": 0,                      "y": 0,                      "width": 120,                      "height": 120,                      "zOrder": 50                    }                  }                ],                "videoInputs": [                  {                    "rtc": {                      "rtcChannel": "test01",                      "rtcUid": 123,                      "rtcToken": "aab8b8f5a8cd4469a63042fcfafe7***"                    },                    "placeholderImageUrl": "https://example.jpg",                    "region": {                      "x": 0,                      "y": 0,                      "width": 320,                      "height": 360,                      "zOrder": 2                    }                  },                  {                    "rtc": {                      "rtcChannel": "test01",                      "rtcUid": 456,                      "rtcToken": "aab8b8f5a8cd4469a63042fcfafe7***"                    },                    "placeholderImageUrl": "https://example.jpg",                    "region": {                      "x": 320,                      "y": 0,                      "width": 320,                      "height": 320,                      "zOrder": 2                    }                  }                ],                "outputs": [                  {                    "rtc": {                      "rtcChannel": "test",                      "rtcUid": 1000,                      "rtcToken": "aab8b8f5a8cd4469a63042fcfafe7***"                    },                    "audioOption": {                      "profileType": "AUDIO_PROFILE_MUSIC_STANDARD"                    },                    "videoOption": {                      "fps": 30,                      "codec": "H264",                      "bitrate": 800,                      "width": 960,                      "height": 480,                      "lowBitrateHighQuality": false                    }                  }                ]              }            }          }        }      }'

Response example

Empty
{  "message": "Describes why the request failed."}