GetWorkitem - Get a work item
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
- Get the endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
- Get organizationId: Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain your organization ID.
|
Product |
Resource |
Required permission |
|
Project Collaboration |
Work item |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}
Region edition
GET https://{domain}/oapi/v1/projex/workitems/{id}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
id |
string |
path |
Yes |
Unique identifier of the work item. |
|
|
organizationId |
string |
path |
|
organizationId. |
|
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}' \
-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}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| assignedTo |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| categoryId |
string |
Work item category ID. |
Req |
| creator |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| customFieldValues |
array |
Custom field values. |
|
| - |
object |
|
|
| fieldFormat |
string |
Field type. |
User |
| fieldId |
string |
Field ID. |
126553d622cc8521793e08**** |
| fieldName |
string |
Field name. |
field-name-xxx |
| values |
array |
Field values. |
|
| - |
object |
|
|
| displayValue |
string |
Display name. |
|
| identifier |
string |
Unique identifier of the value. |
|
| description |
string |
Description. |
test |
| formatType |
string |
Description format. Supported values are RICHTEXT and MARKDOWN. |
RICHTEXT |
| gmtCreate |
string |
Creation time. |
|
| gmtModified |
string |
Modification time. |
|
| id |
string |
Work item ID. |
id-2 |
| idPath |
string |
Work item ID path. |
id-1,id-2 |
| labels |
array |
Labels. |
|
| - |
object |
|
|
| color |
string |
Color. |
test |
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
test |
| logicalStatus |
string |
Logical status. normal indicates an active work item. archived indicates an archived work item. |
normal |
| modifier |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| parentId |
string |
Parent work item ID. |
id-1 |
| participants |
array |
Participants. |
|
| - |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| serialNumber |
string |
Serial number. |
DSDD-123 |
| space |
object |
|
|
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
test |
| sprint |
object |
|
|
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
test |
| status |
object |
|
|
| displayName |
string |
Display name. |
To Do |
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
To Do |
| nameEn |
string |
English name. |
TODO |
| statusStageId |
string |
Status stage ID. |
id-xxx |
| subject |
string |
Title. |
test |
| trackers |
array |
Trackers. |
|
| - |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| updateStatusAt |
string |
Status update time. |
|
| verifier |
object |
|
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Name. |
name-xxx |
| versions |
array |
Version. |
|
| - |
object |
|
|
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
test |
| workitemType |
object |
|
|
| id |
string |
ID. |
id-xxx |
| name |
string |
Name. |
test |
Response example
{
"assignedTo": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"categoryId": "Req",
"creator": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"customFieldValues": [
{
"fieldFormat": "User",
"fieldId": "126553d622cc8521793e08****",
"fieldName": "field-name-xxx",
"values": [
{
"displayValue": "",
"identifier": ""
}
]
}
],
"description": "test",
"formatType": "RICHTEXT",
"gmtCreate": "",
"gmtModified": "",
"id": "id-2",
"idPath": "id-1,id-2",
"labels": [
{
"color": "test",
"id": "id-xxx",
"name": "test"
}
],
"logicalStatus": "normal",
"modifier": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"parentId": "id-1",
"participants": [
{
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
}
],
"serialNumber": "DSDD-123",
"space": {
"id": "id-xxx",
"name": "test"
},
"sprint": {
"id": "id-xxx",
"name": "test"
},
"status": {
"displayName": "To Do",
"id": "id-xxx",
"name": "To Do",
"nameEn": "TODO"
},
"statusStageId": "id-xxx",
"subject": "test",
"trackers": [
{
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
}
],
"updateStatusAt": "",
"verifier": {
"id": "674d96abd497cd558d68****",
"name": "name-xxx"
},
"versions": [
{
"id": "id-xxx",
"name": "test"
}
],
"workitemType": {
"id": "id-xxx",
"name": "test"
}
}
Error codes
For more information, see Error Code Center for API-related error codes.