DescribeJobs

Last updated: 2020-10-20 16:03:33

1. API Description

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

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

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 parameter. The value used for this API: DescribeJobs.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
JobIds.N No Array of String Instance ID
Filters.N No Array of Filter Filter.
  • job-id - String - Optional - Filter by job ID.
  • job-name - String - Optional - Filter by job name.
  • job-state - String - Optional - Filter by job state.
  • zone - String - Optional - Filter by availability zone.
  • tag-key - String - Optional - Filter by tag key.
  • tag-value - String - Optional - Filter by tag value.
  • tag:tag-key - String - Optional - Filter by tag key-value pair. The tag-key should be replaced by a specified tag key.

  • It cannot be specified together with the JobIds parameter.
    Offset No Integer Offset
    Limit No Integer Number of returned results

    3. Output Parameters

    Parameter Name Type Description
    JobSet Array of JobView List of instances
    TotalCount Integer Number of eligible instances
    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

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    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 instance ID format.
    InvalidParameterValue Incorrect parameter value.
    InvalidZone.MismatchRegion The specified zone does not exist.
    UnknownParameter Unknown parameter.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help