Cancel audio moderation tasks
To cancel an asynchronous audio moderation task after you submit it, call the /green/voice/cancelscan API operation.
Usage notes
The /green/voice/cancelscan API operation cancels an audio moderation task.
You can call this operation to cancel audio moderation tasks that are in the queue or in progress. You cannot cancel completed tasks. For more information about how to construct an HTTP request, see Request structure. You can also directly use a pre-built HTTP request. For more information, see SDK overview.
Billing: This API operation is free. If you cancel an audio moderation task, you are still charged for the duration of the audio that has already been processed.
QPS limit
The queries per second (QPS) limit for this API is 50 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.
Request parameters
For information about the common request parameters that must be included in a request, see Common parameters.
| Name | Type | Required | Example | Description |
| body | JSONArray | Yes | ["taskId1","taskId2"] | A list of taskIds to cancel. You can cancel up to 100 tasks. |
Returned data
For more information about the response, see Response parameters.
| Name | Type | Example | Description |
| code | Integer | 200 |
The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
| msg | String | OK | The message returned in the response. |
| dataId | String | dataId1 | The dataId from the request. |
| taskId | String | taskId1 | The ID of the moderation task. |
Examples
http://[Endpoint]/green/voice/cancelscan
&<Common request parameters>
[
"taskId1",
"taskId2"
]{
"code":200,
"msg":"OK",
"requestId":"AD87F1D1-A675-4F82-8D67-ED43B6FFA876",
"data":[
{
"code":200,
"msg":"ok",
"dataId":"dataId1",
"taskId":"taskId1"
},
{
"code":200,
"msg":"ok",
"dataId":"dataId2",
"taskId":"taskId2"
}
]
}