> 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/platform-service/zsp/ticket/describetickets.md).

# DescribeTickets

## 1. API Description

This API (DescribeTickets) is used to query the list of tickets submitted by the current team.

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

* This API returns only the tickets submitted by the current team.
* Both `ticketId` and `ticketNumber` support fuzzy queries. They can be specified at the same time, in which case the intersection is returned.
* Call [DescribeTicketDetail](/api-reference/platform-service/zsp/ticket/describeticketdetail.md) when you need the contact information and the email correspondence records.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                                       | Description                                                                                                                                                                                                  |
| -------------- | -------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ticketId       | No       | String                                                                                     | Ticket ID. Fuzzy query is supported.                                                                                                                                                                         |
| ticketNumber   | No       | String                                                                                     | <p>Ticket number. Fuzzy query is supported.</p><p>A ticket that is still being created (the status is CREATING) does not have a ticket number yet, so filtering by this condition excludes such tickets.</p> |
| type           | No       | [TicketType](/api-reference/platform-service/zsp/datastructure.md#tickettype)              | Ticket type.                                                                                                                                                                                                 |
| description    | No       | String                                                                                     | Issue description. Fuzzy query is supported.                                                                                                                                                                 |
| statuses       | No       | Array of [TicketStatus](/api-reference/platform-service/zsp/datastructure.md#ticketstatus) | <p>The list of ticket statuses.</p><p>If left empty, tickets in all statuses are returned.</p>                                                                                                               |
| startTime      | No       | String                                                                                     | <p>The start of the creation time query range.</p><p>Time format: yyyy-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ.</p>                                      |
| endTime        | No       | String                                                                                     | <p>The end of the creation time query range.</p><p>Time format: yyyy-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ.</p>                                        |
| createTimeDesc | No       | Boolean                                                                                    | <p>Whether the returned results are sorted by creation time in descending order.</p><p>Default value: true</p>                                                                                               |
| pageSize       | No       | Integer                                                                                    | <p>The page size.</p><p>If not specified, the default value is 20.</p><p>Value range: \[1, 1000]</p>                                                                                                         |
| pageNum        | No       | Integer                                                                                    | <p>The page number.</p><p>If not specified, the default value is 1.</p><p>Value range: \[1, +)</p><p>Default value: 1</p>                                                                                    |

## 3. Output Parameters

| Parameter Name | Type                                                                                   | Description                                                                                                           |
| -------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                 | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                                | The total number of records that match the query conditions.                                                          |
| dataSet        | Array of [TicketItem](/api-reference/platform-service/zsp/datastructure.md#ticketitem) | The ticket result set.                                                                                                |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query all tickets of the current team.**

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

Request:
{
  "pageNum": 1,
  "pageSize": 20
}

Response:
{
  "requestId": "T12345678-0000-0000-0000-000000000003",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000003",
    "totalCount": 2,
    "dataSet": [
      {
        "ticketId": "T-1000000000000001",
        "ticketNumber": "00123456",
        "type": "SERVICE_FAILURE",
        "status": "PROCESSING",
        "description": "Instance vm-xxxxxxxx in region SEA-A cannot be logged in via SSH.",
        "createTime": "2026-08-19T10:05:00Z"
      },
      {
        "ticketId": "T-1000000000000003",
        "ticketNumber": null,
        "type": "FINANCIAL_INQUIRIES",
        "status": "CREATING",
        "description": "The charges in the July 2026 bill do not match the usage.",
        "createTime": "2026-08-19T14:32:00Z"
      }
    ]
  }
}
```

**2. Filter by status and type.**

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

Request:
{
  "type": "SERVICE_FAILURE",
  "statuses": ["NEW", "PROCESSING"]
}

Response:
{
  "requestId": "T12345678-0000-0000-0000-000000000004",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000004",
    "totalCount": 1,
    "dataSet": [
      {
        "ticketId": "T-1000000000000001",
        "ticketNumber": "00123456",
        "type": "SERVICE_FAILURE",
        "status": "PROCESSING",
        "description": "Instance vm-xxxxxxxx in region SEA-A cannot be logged in via SSH.",
        "createTime": "2026-08-19T10:05:00Z"
      }
    ]
  }
}
```

**3. Query by ticket number with a fuzzy match, and return the results in ascending order of creation time.**

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

Request:
{
  "ticketNumber": "001234",
  "createTimeDesc": false
}

Response:
{
  "requestId": "T12345678-0000-0000-0000-000000000005",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000005",
    "totalCount": 1,
    "dataSet": [
      {
        "ticketId": "T-1000000000000001",
        "ticketNumber": "00123456",
        "type": "SERVICE_FAILURE",
        "status": "PROCESSING",
        "description": "Instance vm-xxxxxxxx in region SEA-A cannot be logged in via SSH.",
        "createTime": "2026-08-19T10:05:00Z"
      }
    ]
  }
}
```

**4. Query by ticket ID with a fuzzy match.**

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

Request:
{
  "ticketId": "T-10000000000000"
}

Response:
{
  "requestId": "T12345678-0000-0000-0000-000000000006",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000006",
    "totalCount": 2,
    "dataSet": [
      {
        "ticketId": "T-1000000000000001",
        "ticketNumber": "00123456",
        "type": "SERVICE_FAILURE",
        "status": "PROCESSING",
        "description": "Instance vm-xxxxxxxx in region SEA-A cannot be logged in via SSH.",
        "createTime": "2026-08-19T10:05:00Z"
      },
      {
        "ticketId": "T-1000000000000003",
        "ticketNumber": null,
        "type": "FINANCIAL_INQUIRIES",
        "status": "CREATING",
        "description": "The charges in the July 2026 bill do not match the usage.",
        "createTime": "2026-08-19T14:32:00Z"
      }
    ]
  }
}
```

**5. Filter by creation time range.**

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

Request:
{
  "startTime": "2026-08-01T00:00:00Z",
  "endTime": "2026-08-19T23:59:59Z"
}

Response:
{
  "requestId": "T12345678-0000-0000-0000-000000000007",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000007",
    "totalCount": 0,
    "dataSet": []
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
