tencent cloud

Feedback

CancelTask

Last updated: 2023-12-04 16:14:03

    1. API Description

    Domain name for API request: ams.tencentcloudapi.com.

    This API is used to cancel a moderation task. If it returns RequestId, the task has been canceled successfully.
    Default API request rate limit: 20 requests/sec.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: CancelTask.
    Version Yes String Common Params. The value used for this API: 2020-12-29.
    Region No String Common Params. This parameter is not required for this API.
    TaskId Yes String This field indicates the task ID (in the Results parameter) returned after an audio moderation task is created. It is used to identify the moderation task to be canceled.

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Canceling task

    This example shows you how to cancel a task.

    Input Example

    POST / HTTP/1.1
    Host: ams.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CancelTask
    <Common request parameters>
    
    {
        "TaskId": "task-audio-XwxJtbkKXWgCt8AZ"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "c933aca1-90d2-4ab8-b045-f1b08069d76f"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
    FailedOperation The operation failed.
    InvalidParameter The parameter is incorrect.
    InvalidParameterValue The parameter value is incorrect.
    LimitExceeded The quota limit is exceeded.
    MissingParameter The parameter is missing.
    OperationDenied The operation was denied.
    RequestLimitExceeded The number of requests exceeds the frequency limit.
    ResourceInUse The resource is in use.
    ResourceInsufficient The resource is insufficient.
    ResourceNotFound The resource does not exist.
    ResourceUnavailable The resource is unavailable.
    ResourcesSoldOut The resources have been sold out.
    UnauthorizedOperation The operation is unauthorized.
    UnknownParameter The parameter is unknown.
    UnsupportedOperation The operation is not supported.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support