ListWorkitemTypes
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization
-
Get an endpoint: Replace the
{domain}placeholder in the API request syntax with your endpoint. -
Get the organization ID: Required only for the Central edition. Find your organization ID on the Basic Information page of the organization management console.
|
Product |
Resource |
Required permissions |
|
Project Collaboration |
workitem type |
read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}/workitemTypes
Region edition
GET https://{domain}/oapi/v1/projex/projects/{id}/workitemTypes
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
The personal access token for Alibaba Cloud DevOps. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
id |
string |
path |
Yes |
The unique identifier of the project. |
|
|
organizationId |
string |
path |
|
The organization ID. |
|
|
category |
string |
query |
Yes |
The category of the workitem type. Valid values are Req, Bug, and Task. |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}/workitemTypes?category={category}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/projects/{id}/workitemTypes?category={category}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
array |
The list of workitem types. |
|
| - |
object |
The details of a workitem type. |
|
| addUser |
object |
Information about the user who added the type. |
|
|
id |
string |
The ID of the user. |
674d96abd497cd558d68**** |
|
name |
string |
The name of the user. |
name-xxx |
|
categoryId |
string |
The unique identifier of the category, such as Req, Task, or Bug. |
Req |
| creator |
object |
Information about the user who created the type. |
|
|
id |
string |
The ID of the user. |
674d96abd497cd558d68**** |
|
name |
string |
The name of the user. |
name-xxx |
|
defaultType |
boolean |
Indicates whether this is the default type. |
true |
|
description |
string |
The description of the workitem type. |
Type description |
|
enable |
boolean |
Indicates whether the type is enabled. |
true |
|
gmtAdd |
string |
The time the type was added. |
|
|
gmtCreate |
string |
The time the type was created. |
|
|
id |
string |
The unique identifier of the workitem type. |
bca48ee2a0976d38f48**** |
|
name |
string |
The name of the workitem type. |
Technical Requirement |
|
nameEn |
string |
The English name of the workitem type. |
Technical Requirements |
|
systemDefault |
boolean |
Indicates whether the type is a system default. |
true |
Response example
[
{
"addUser": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"categoryId": "Req",
"creator": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"defaultType": true,
"description": "Type description",
"enable": true,
"gmtAdd": "",
"gmtCreate": "",
"id": "bca48ee2a0976d38f48****",
"name": "Technical Requirement",
"nameEn": "Technical Requirements",
"systemDefault": true
}
]
Error codes
For a list of API error codes, see the Error Code Center.