适用版本 | 中心版、Region版 |
服务接入点与授权信息
产品 | 资源 | 所需权限 |
项目协作 | 工作项工作流 | 只读 |
请求语法
中心版
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/workflow
Region版
GET https://{domain}/oapi/v1/projex/workitems/{id}/workflow
请求头
参数 | 类型 | 是否必填 | 描述 | 示例值 |
x-yunxiao-token | string | 是 | 个人访问令牌。 | pt-0fh3****0fbG_35af****0484 |
请求参数
参数 | 类型 | 位置 | 是否必填 | 描述 | 示例值 |
organizationId | string | path | 是 | 组织 ID。 | |
id | string | path | 是 | 工作项唯一标识。 | |
X-Tenant-Id | string | header | 是 | 租户 ID。 | |
x-yunxiao-userid | string | header | 否 | 云效用户 ID。 | |
x-yunxiao-appid | string | header | 否 | 云效应用 ID。 |
请求示例
中心版
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版
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'
返回参数
参数 | 类型 | 描述 | 示例值 |
| - | object | ||
| defaultStatusId | string | 默认状态 id。 | TODO |
| id | string | 工作流 id。 | 89c213d622cc8521793e08**** |
| name | string | 工作流名称。 | test |
| statuses | array | 包含的状态列表。 | |
| - | object | ||
| displayName | string | 显示名称。 | 待处理 |
| id | string | id。 | id-xxx |
| name | string | 名称。 | 待处理 |
| nameEn | string | 英文名称。 | TODO |
返回示例
{
"defaultStatusId": "TODO",
"id": "89c213d622cc8521793e08****",
"name": "test",
"statuses": [
{
"displayName": "待处理",
"id": "id-xxx",
"name": "待处理",
"nameEn": "TODO"
}
]
}
错误码
访问错误码中心查看 API 相关错误码。
该文章对您有帮助吗?