tencent cloud

Feedback

DescribeJobs

Last updated: 2023-05-04 15:47:08

1. API Description

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

This API is used to query the overview information of several jobs.

A maximum of 2 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: DescribeJobs.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
JobIds.N No Array of String List of job IDs. It cannot be specified together with Filters.
Filters.N No Array of Filter Filter
  • job-id - String - Optional - Filter by the job ID.
  • job-name - String - Optional - Filter by the job name.
  • job-state - String - Optional - Filter by the job state.
  • zone - String - Optional - Filter by the availability zone.
  • tag-key - String - Optional - Tag key.
  • tag-value - String - Optional - Tag value.
  • tag:tag-key - String - Optional - Filter by the tag key-value pair. The tag-key should be replaced by a specified tag key.

  • It cannot be specified together with JobIds.
    Offset No Integer Offset
    Limit No Integer Maximum number of returned items

    3. Output Parameters

    Parameter Name Type Description
    JobSet Array of JobView List of jobs
    TotalCount Integer Number of matched jobs
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying job information

    Input Example

    https://batch.tencentcloudapi.com/?Action=DescribeJobs
    &JobIds.0=job-7e7evk2x
    &JobIds.1=job-3n2weaqt
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TotalCount": 2,
            "JobSet": [
                {
                    "EndTime": null,
                    "JobState": "STARTING",
                    "Tags": [
                        {
                            "Key": "batch-test-tag-job-key",
                            "Value": "batch-test-tag-job-value"
                        }
                    ],
                    "TaskMetrics": {
                        "PendingCount": 0,
                        "FailedCount": 0,
                        "StartingCount": 1,
                        "SucceedCount": 0,
                        "FailedInterruptedCount": 0,
                        "SubmittedCount": 0,
                        "RunnableCount": 0,
                        "RunningCount": 0
                    },
                    "JobId": "job-3n2weaqt",
                    "Priority": 1,
                    "Placement": {
                        "Zone": "ap-guangzhou-4"
                    },
                    "JobName": "hello-test-job",
                    "CreateTime": "2020-09-22T07:14:54Z"
                },
                {
                    "EndTime": "2020-09-21T08:59:45Z",
                    "JobState": "FAILED",
                    "Tags": [
                        {
                            "Key": "job-key1",
                            "Value": "job-value1"
                        },
                        {
                            "Key": "job-key",
                            "Value": "job-value"
                        }
                    ],
                    "TaskMetrics": {
                        "PendingCount": 0,
                        "FailedCount": 1,
                        "StartingCount": 0,
                        "SucceedCount": 0,
                        "FailedInterruptedCount": 0,
                        "SubmittedCount": 0,
                        "RunnableCount": 0,
                        "RunningCount": 0
                    },
                    "JobId": "job-7e7evk2x",
                    "Priority": 1,
                    "Placement": {
                        "Zone": "ap-guangzhou-4"
                    },
                    "JobName": "hello-test-job",
                    "CreateTime": "2020-09-21T08:57:01Z"
                }
            ],
            "RequestId": "ba5df388-51bd-434d-81aa-d640f284b4e7"
        }
    }
    

    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
    InternalError Internal error.
    InvalidFilter The specified filter is not supported.
    InvalidParameter.InvalidParameterCombination Invalid parameter combination.
    InvalidParameter.JobIdMalformed Invalid job ID format.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.InvalidFilter Incorrect Filter parameter.
    InvalidParameterValue.LimitExceeded The number of filter parameter values exceeds the limit.
    InvalidZone.MismatchRegion The specified zone does not exist.
    UnknownParameter Unknown parameter error.
    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