GetWorkitemWorkflowInfo - Get work item workflow
|
Applicable editions |
Central edition, Region edition |
Service endpoint and authorization
- Obtain service endpoint: Replace
{domain}in the request syntax. - Obtain personal access token.
- Obtain the organization ID: Required only for the Central edition. Go to the organization management console > Basic Information to obtain the organization ID.
|
Product |
Resource |
Required permission |
|
Project Collaboration |
work item workflow |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/workflow
Region edition
GET https://{domain}/oapi/v1/projex/workitems/{id}/workflow
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
String |
Yes |
A personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example |
|
organizationId |
String |
path |
Yes |
The organization ID. This parameter is required only for the Central edition. |
|
|
id |
String |
path |
Yes |
The unique ID of the work item. |
|
|
X-Tenant-Id |
String |
header |
Yes |
The tenant ID. |
|
|
x-yunxiao-userid |
String |
header |
No |
The user ID in Apsara DevOps. |
|
|
x-yunxiao-appid |
String |
header |
No |
The application ID in Apsara DevOps. |
|
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/workflow' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/workitems/{id}/workflow' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
Object |
The response body. |
|
| defaultStatusId |
String |
The ID of the default status. |
TODO |
| id |
String |
The workflow ID. |
89c213d622cc8521793e08**** |
| name |
String |
The name of the workflow. |
test |
| statuses |
Array |
A list of statuses in the workflow. |
|
| - |
Object |
A status object. |
|
| displayName |
String |
The display name of the status. |
TODO |
| id |
String |
The status ID. |
id-xxx |
| name |
String |
The name of the status. |
TODO |
| nameEn |
String |
The English name of the status. |
TODO |
Response example
{
"defaultStatusId": "TODO",
"id": "89c213d622cc8521793e08****",
"name": "test",
"statuses": [
{
"displayName": "TODO",
"id": "id-xxx",
"name": "TODO",
"nameEn": "TODO"
}
]
}
Error codes
Refer to the Error Code Center for a list of API error codes.