tencent cloud

Feedback

DescribeTasks

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

    1. API Description

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

    This API is used to view the list of moderation tasks. You can also filter moderation tasks by multiple types of business information, such as business type, moderation result, and task status. The output content of the task list includes the total number of queried tasks, task name, task status, audio moderation type, maliciousness tag of the detection result, and suggested operation. For the specific output content, see the sample output parameters.
    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: DescribeTasks.
    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.
    Limit No Integer This parameter indicates the number of tasks to be displayed on each page of the task list. Default value: 10.
    Filter No TaskFilter This parameter indicates the input parameter of the task filter. You can filter tasks by business type, file type, processing suggestion, and task status. For the specific parameter content, see the detailed description of the TaskFilter data structure.
    PageToken No String This parameter indicates the Token information used during pagination. It is automatically generated by the system and will be passed to the next generated page for easy and fast pagination. When you turn to the last page, this field will be empty.
    StartTime No Timestamp ISO8601 This parameter indicates the start time of the task list in ISO 8601 timestamp format. Default value: 3 days ago. If this parameter is passed in, tasks between this time point and EndTime will be filtered out.
    Note: this parameter is used together with Filter to filter tasks in no particular order.
    EndTime No Timestamp ISO8601 This parameter indicates the end time of the task list in ISO 8601 timestamp format. Default value: empty. If this parameter is passed in, tasks between StartTime and this time point will be filtered out.
    Note: this parameter is used together with Filter to filter tasks in no particular order.

    3. Output Parameters

    Parameter Name Type Description
    Total String This field is used to return the total number of queried tasks in the format of int string.
    Note: this field may return null, indicating that no valid values can be obtained.
    Data Array of TaskData This field is used to return the detailed data of the tasks on the current page. For the specific output content, see the detailed description of the TaskData data structure.
    Note: this field may return null, indicating that no valid values can be obtained.
    PageToken String This field is used to return the Token information used during pagination. It is automatically generated by the system and will be passed to the next generated page for easy and fast pagination. When you turn to the last page, this field will be empty.
    Note: this field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Viewing moderation task list

    This example shows you how to view the list of moderation tasks.

    Input Example

    POST / HTTP/1.1
    Host: ams.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTasks
    <Common request parameters>
    
    {
        "Filter": {
            "Type": "AUDIO"
        }
    }
    

    Output Example

    {
        "Response": {
            "Total": "1",
            "Data": [
                {
                    "TaskId": "task-video-XwxJtbkKXWgCt8AZ",
                    "DataId": "data_test_01",
                    "BizType": "1001",
                    "Name": "Test video",
                    "Status": "FINISH",
                    "Type": "VIDEO",
                    "Suggestion": "Block",
                    "Labels": [
                        {
                            "Label": "Porn",
                            "Suggestion": "Block",
                            "Score": 99
                        },
                        {
                            "Label": "Hot",
                            "Suggestion": "Block",
                            "Score": 70
                        }
                    ],
                    "MediaInfo": {
                        "Codecs": "h264 aac",
                        "Duration": 36,
                        "Width": 352,
                        "Height": 640
                    },
                    "CreatedAt": "2020-07-13T11:47:01.925Z",
                    "UpdatedAt": "2020-07-13T11:47:25.840Z"
                }
            ],
            "PageToken": "4765-48dXwxJtbkKXW8d3eb",
            "RequestId": "8d3e4765-48db-40b5-8fdb-aaf1d7225a60"
        }
    }
    

    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