文档

ListWorkitems - 获取工作项列表

更新时间:

获取工作项列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /organization/{organizationId}/listWorkitems

请求参数

名称类型必填描述示例值
organizationIdstring

企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

5ebbc0228123212b59xxxxx
spaceTypestring

资源类型

Project
spaceIdentifierstring

项目 id,同 projectId,项目唯一标识 id

8fb83debd69a6c7c6626......
categorystring

工作项大类型,需求为 Req,缺陷为 Bug,任务为 Task,风险为 Risk,原始诉求为 Request,主题为 Topic

Req
nextTokenstring

第一页值不需要填写,后面每一页的值需要从前一次调用结果中获取到此字段,然后获取后面的分页数据

""
maxResultsstring

每页最大返回数量,0-200,默认值 20

20
conditionsstring

过滤条件,可以参考页面上的工作项列表中请求 workitem/list 的搜索参数。 注意:里面的人员 id,要为阿里云 accountID,即账号 ID

{"conditionGroups":[]}
extraConditionsstring

额外条件,当该字段不为空时,conditions 也不能为空

{"conditionGroups":[]}
groupConditionstring

分组条件,可以参考页面上的工作项列表中请求 workitem/list 的搜索参数。 注意:里面的人员 id,要为阿里云 accountID,即账号 ID

{"fieldIdentifier":"tag","className":"tag","format":"multiList","value":["c76e0e4bf64801cfad73......"],"operator":"EQUALS"}
orderBystring

排序顺序,可以参考页面上的工作项列表中请求 workitem/list 的搜索参数。 注意:里面的人员 id,要为阿里云 accountID,即账号 ID

{"fieldIdentifier":"status","format":"list","order":"desc","className":"status"}
searchTypestring

搜索类型,默认是 LIST,还可支持树形 TREE 等类型,具体更多参见页面请求的参数。

LIST

返回参数

名称类型描述示例值
object
totalCountlong

总数

10
nextTokenstring

分页 Token,没有下一页则为空

""
maxResultslong

每页数量

20
requestIdstring

请求 id,每次请求都是唯一值,便于后续排查问题

ASSDS-ASSASX-XSAXSA-XSAXSAXS
errorMsgstring

错误信息

error
errorCodestring

错误码

Openapi.RequestError
successboolean

true 或者 false

true
workitemsobject []

工作项信息

identifierstring

工作项唯一标识

e8bxxxxxxxxxxxxxxxx23
subjectstring

工作项标题

测试工作项
documentstring

工作项内容

html格式
assignedTostring

负责人的阿里云 accountID

19xx7043xxxxxxx914
statusstring

状态名称

待处理
statusStageIdentifierstring

状态阶段 id

1
spaceIdentifierstring

所属项目 id

e8b26xxxxx6e76aa20xxxxx23
spaceNamestring

所属项目名称

需求项目
spaceTypestring

项目类型

Project
logicalStatusstring

逻辑状态

NORMAL
categoryIdentifierstring

工作项的类型 id

Req
parentIdentifierstring

父工作项 id

e8bxxxxxxxxxxxxxxxx24
workitemTypeIdentifierstring

工作项类型 id

9uxxxxxxre573f5xxxxxx0
updateStatusAtlong

状态更新时间

1640850328000
serialNumberstring

编号

ABCD-1
gmtCreatelong

创建时间的时间戳,单位毫秒

1640850318000
gmtModifiedlong

修改时间的时间戳,单位毫秒

1640850318000
creatorstring

创建人的阿里云 accountID

19xx7043xxxxxxx914
modifierstring

修改人的阿里云 accountID

19xx7043xxxxxxx914
statusIdentifierstring

状态唯一标识

100005
sprintIdentifierstring

迭代 id

75528f17703e92e5a568......
finishTimelong

完成时间

1699366778000

示例

正常返回示例

JSON格式

{
  "totalCount": 10,
  "nextToken": "\"\"",
  "maxResults": 20,
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMsg": "error",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "workitems": [
    {
      "identifier": "e8bxxxxxxxxxxxxxxxx23",
      "subject": "测试工作项",
      "document": "html格式",
      "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",
      "sprintIdentifier": "75528f17703e92e5a568......",
      "finishTime": 1699366778000
    }
  ]
}

错误码

HTTP status code错误码错误信息描述
400Openapi.RequestErrorrequest errorOpenAPI请求数据错误
403Operate.NoPermissionNoPermission没有权限

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-11-07OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:403
出参OpenAPI 返回结构发生变更
  • 本页导读 (0)
文档反馈