获取工作项的基本信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /organization/{organizationId}/workitems/{workitemId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organizatio |
5e706xxxxxx01xxx96 |
| workitemId |
string |
是 |
工作项 id,同 workitemIdentifier 字段,工作项唯一标识,可以在获取工作项列表的接口 ListWorkItems 中获取 |
ce2xxxx21580baxxxx633f13 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
工作项请求结果 |
||
| requestId |
string |
请求 id,每次请求都是唯一值,便于后续排查问题 |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorCode |
string |
错误码 |
Openapi.RequestError |
| errorMessage |
string |
错误信息 |
error |
| success |
boolean |
true 或者 false |
true |
| workitem |
object |
工作项信息 |
|
| identifier |
string |
工作项唯一标识 |
e8bxxxxxxxxxxxxxxxx23 |
| subject |
string |
工作项标题 |
测试工作项 |
| document |
string |
工作项内容 |
html格式 |
| documentFormat |
string |
工作项内容格式,支持 RICHTEXT 和 MARKDOWN |
RICHTEXT |
| assignedTo |
string |
负责人 |
19xx7043xxxxxxx914 |
| status |
string |
状态名称 |
待处理 |
| statusStageIdentifier |
string |
状态阶段 id |
1 |
| spaceIdentifier |
string |
所属项目 id |
e8b26xxxxx6e76aa20xxxxx23 |
| spaceName |
string |
所属项目名称 |
需求项目 |
| spaceType |
string |
项目类型 |
Project |
| logicalStatus |
string |
逻辑状态 |
NORMAL |
| categoryIdentifier |
string |
工作项的类型 id |
Req |
| parentIdentifier |
string |
父工作项 id |
e8bxxxxxxxxxxxxxxxx24 |
| workitemTypeIdentifier |
string |
工作项类型 id |
9uxxxxxxre573f5xxxxxx0 |
| updateStatusAt |
integer |
状态更新时间戳,单位毫秒 |
1640850328000 |
| serialNumber |
string |
工作项在项目中的编号 |
ABCD-1 |
| gmtCreate |
integer |
创建时间的时间戳,单位毫秒 |
1640850318000 |
| gmtModified |
integer |
修改时间的时间戳,单位毫秒 |
1640850318000 |
| creator |
string |
创建人的阿里云 accountId |
19xx7043xxxxxxx914 |
| modifier |
string |
修改人的阿里云 accountId |
19xx7043xxxxxxx914 |
| statusIdentifier |
string |
状态 id |
例:100005 |
| sprint |
array |
关联的迭代 id |
|
|
string |
迭代唯一标识 |
81be626abf9b63e291bd...... |
|
| tag |
array |
标签 ID 列表 |
|
|
string |
tag 的唯一标识 |
c76e0e4bf64801cfad73...... |
|
| participant |
array |
参与人 account id 列表 |
|
|
string |
参与人 account id |
1561159309...... |
|
| tracker |
array |
抄送人的 account id 列表 |
|
|
string |
抄送人的 account id |
1561159309...... |
|
| verifier |
array |
验证者的 account id 列表 |
|
|
string |
验证者的 account id |
1561159309...... |
|
| customFields |
array<object> |
自定义字段列表 |
|
|
array<object> |
自定义字段 |
||
| fieldIdentifier |
string |
字段的唯一标识 |
例:80 |
| fieldFormat |
string |
字段格式,便于查询数据 |
例:input |
| fieldClassName |
string |
字段的 className,便于数据查询 |
例如:date |
| objectValue |
string |
值对象列表 |
null |
| value |
string |
字段值,写入时使用 |
例:2022-01-06 00:00:00 |
| workitemIdentifier |
string |
工作项的唯一标识 |
5daa9a15c7fd55523996...... |
| position |
integer |
自定义字段值的 position |
1 |
| level |
integer |
展示级别,数字范围 1~9,数字越大,颜色越浅。 |
1 |
| valueList |
array<object> |
值对象列表,查询时使用 |
|
|
object |
自定义字段的值列表 |
||
| value |
string |
字段值 |
2022-02-01 00:00:00 |
| valueEn |
string |
字段英文值,目前只有列表类有英文值 |
null |
| displayValue |
string |
根据语言环境获取当前展示的值 |
2022-02-01 00:00:00 |
| identifier |
string |
字段值为对象类型时,值所对应的对象的唯一标识例如:option 表中的 id |
2022-02-01 00:00:00 |
| level |
integer |
展示级别,数字范围 1~9,数字越大,颜色越浅。 |
1 |
| finishTime |
integer |
完成时间,使用 Unix 时间戳,单位为毫秒。 |
1699366778000 |
| tagDetails |
array<object> |
标签详情 |
|
|
object |
|||
| identifier |
string |
标签唯一标识 |
8d859b4fce9d86bc324a9cf00c |
| name |
string |
标签名称 |
paymentcenter |
| color |
string |
标签颜色 |
#1F9AEF |
| versions |
array<object> |
关联的版本 |
|
|
object |
版本 |
||
| identifier |
string |
版本 id |
ec65ce5dbc84790b53c272cb43 |
| name |
string |
版本名称 |
UAT |
示例
正常返回示例
JSON格式
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorCode": "Openapi.RequestError",
"errorMessage": "error",
"success": true,
"workitem": {
"identifier": "e8bxxxxxxxxxxxxxxxx23",
"subject": "测试工作项",
"document": "html格式",
"documentFormat": "RICHTEXT",
"assignedTo": "19xx7043xxxxxxx914",
"status": "待处理",
"statusStageIdentifier": "1",
"spaceIdentifier": "e8b26xxxxx6e76aa20xxxxx23",
"spaceName": "需求项目",
"spaceType": "Project",
"logicalStatus": "NORMAL",
"categoryIdentifier": "Req",
"parentIdentifier": "e8bxxxxxxxxxxxxxxxx24",
"workitemTypeIdentifier": "9uxxxxxxre573f5xxxxxx0",
"updateStatusAt": 1640850328000,
"serialNumber": "ABCD-1",
"gmtCreate": 1640850318000,
"gmtModified": 1640850318000,
"creator": "19xx7043xxxxxxx914",
"modifier": "19xx7043xxxxxxx914",
"statusIdentifier": "例:100005",
"sprint": [
"81be626abf9b63e291bd......"
],
"tag": [
"c76e0e4bf64801cfad73......"
],
"participant": [
"1561159309......"
],
"tracker": [
"1561159309......"
],
"verifier": [
"1561159309......"
],
"customFields": [
{
"fieldIdentifier": "例:80",
"fieldFormat": "例:input",
"fieldClassName": "例如:date",
"objectValue": "null",
"value": "例:2022-01-06 00:00:00",
"workitemIdentifier": "5daa9a15c7fd55523996......",
"position": 1,
"level": 1,
"valueList": [
{
"value": "2022-02-01 00:00:00",
"valueEn": "null",
"displayValue": "2022-02-01 00:00:00",
"identifier": "2022-02-01 00:00:00",
"level": 1
}
]
}
],
"finishTime": 1699366778000,
"tagDetails": [
{
"identifier": "8d859b4fce9d86bc324a9cf00c",
"name": "paymentcenter",
"color": "#1F9AEF"
}
],
"versions": [
{
"identifier": "ec65ce5dbc84790b53c272cb43",
"name": "UAT"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Openapi.RequestError | request error | OpenAPI请求数据错误 |
| 403 | Operate.NoPermission | NoPermission | 没有权限 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。