# Get a list of issue types

URL: https://docs.ones.cn/developer/openapi/api/get-a-list-of-issue-types

```
GET
## /project/issueTypes

```

Get a list of issue types.

Use `data.list[].testRole` to identify test case, test plan, and defect issue types. The role comes from the team's test type configuration, not from the issue type name or `type` . An issue type without a declared test role returns `none` .

## History

| Version | Changes |
| --- | --- |
| v3.14.117, v3.15.26 | Added in: v3.14.117, v3.15.26 |

## Request

### Query Parameters

**teamID** stringrequired The team ID

**limit** integer **Possible values:**`<= 100`

**Default value:**`50`

The number returned by this request.The default value is 50, exceeding 100 will be truncated to 100

**cursor** string The starting location of this request

## Responses

- 200
- 401
- 403
- 404
- 500

Request is successful.

- application/json

- Schema
- Example (from schema)

**Schema

**

**data

** object

**list

** object[]

- Array [
**name** string Name of the issue type.

**id** string ID of the issue type.

**isSubIssueType** boolean Is it a child work item type.

**type** string Type of the issue type.

**testRole** string **Possible values:** [ `none` , `test_case` , `test_plan` , `defect` ]

Team-level role derived from the team's test type configuration:

- `none` : No test role is declared for this issue type.
- `test_case` : Test case issue type.
- `test_plan` : Test plan issue type.
- `defect` : Defect issue type.

**createTime** integer CreateTime of the issue type.

**buildIn** boolean Whether it is a system built-in work item type.

**project

** object

**name** string Project name of the issue type.

**id** string Project id of the issue type.

- ]

**pageInfo

** object

Page information.

**count** integer The number returned this time.

**endCursor** string The last cursor on this page is generally used to turn pages.

**hasNextPage** boolean Is there a next page.

**startCursor** string The first cursor on this page is generally used to turn pages.

**totalCount** integer The total number of items available in the entire collection, including those that are returned in the current response.

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

**errorData** object Error meta data for this request.

```json
{
  "result": "SUCCESS",
  "data": {
    "list": [
      {
        "id": "case0001",
        "name": "Test case",
        "testRole": "test_case"
      },
      {
        "id": "plan0001",
        "name": "Test plan",
        "testRole": "test_plan"
      },
      {
        "id": "defect01",
        "name": "Defect",
        "testRole": "defect"
      },
      {
        "id": "general1",
        "name": "Task",
        "testRole": "none"
      }
    ],
    "pageInfo": {
      "count": 4,
      "endCursor": "sample_end_cursor",
      "hasNextPage": false,
      "startCursor": "sample_start_cursor",
      "totalCount": 4
    }
  }
}
```

Returned if the authentication credentials are incorrect or missing.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Unauthorized",
  "errorMsg": "Access token is invalid"
}
```

Returns if the scope check fails.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Forbidden",
  "errorMsg": "Scope is invalid"
}
```

Returned if the resource object was not found.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "NotFound",
  "errorMsg": "Not Found"
}
```

Internal Server Error.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Internal Server Error",
  "errorMsg": "Internal Server Error"
}
```
