> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zga/analysis/describestatuscode.md). Agents can also search and read this documentation through its [MCP server](https://docs.console.zenlayer.com/api-reference/~gitbook/mcp).

# DescribeStatusCode

## 1. API Description

This API (DescribeStatusCode) is used to query ZGA Status Codes.

{% hint style="info" %}
**Notes**

* Querying Status Codes for Layer 4 protocol acceleration is not supported.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API Input Parameters.

| Parameter Name     | Required | Type            | Description                                                                                                                                                                                                                  |
| ------------------ | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| startTime          | Yes      | String          | <p>Query start time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:mm:ssZ</code>.</p>                                                                                               |
| endTime            | Yes      | String          | <p>Query end time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:mm:ssZ</code>.</p><p>The end time point must be greater than the start time</p>                                    |
| acceleratorIds     | Optional | Array of String | <p>Accelerator ID.</p><p>\* Query aggregated Status Code data for multiple Accelerators.</p><p>\* By default, query aggregated Status Code data for all resources.</p>                                                       |
| originRegionId     | Optional | String          | <p><a href="https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#region">Origin Region Id</a></p><p>When configured together with accelerateRegionId, query aggregated Status Code data for the route.</p>   |
| accelerateRegionId | Optional | String          | <p><a href="https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#region">Acceleration Region Id</a></p><p>When configured together with originRegionId, query aggregated Status Code data for the route.</p> |
| resourceGroupId    | Optional | String          | <p>The ID of the Resource Group.</p><p>Query aggregated Status Code data for the Resource Group.</p>                                                                                                                         |

## 3. Output Parameters

| Parameter Name | Type                                                                                                           | Description                                                                                                           |
| -------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| dataList       | Array of [StatusCodeData](https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#statuscodedata) | List of Status Codes.                                                                                                 |
| requestId      | String                                                                                                         | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}

1. **Query ZGA Status Codes.**

```json
POST / HTTP/1.1
Host: console.zenlayer.com/api/v2/zga
Content-Type: application/json
X-TC-Action: DescribeStatusCode
<Common Request Params>

Request:
{
    "startTime": "2025-11-19T07:02:00Z",
    "endTime": "2025-11-19T07:03:00Z"
}

Response:
{
  "requestId": "T89229C38-1EDD-4CA5-87CF-3A35C5805C50",
  "response": {
    "requestId": "T89229C38-1EDD-4CA5-87CF-3A35C5805C50",
    "dataList": [
      {
        "time": "2025-11-19T07:02:00Z",
        "detail": [
          { "code": "200", "count": 17 },
          { "code": "403", "count": 16 },
          { "code": "500", "count": 16 }
        ]
      },
      {
        "time": "2025-11-19T07:03:00Z",
        "detail": [
          { "code": "200", "count": 17 },
          { "code": "403", "count": 17 },
          { "code": "500", "count": 17 }
        ]
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode.md).
