ListWorkitems - 获取工作项列表

更新时间:
复制 MD 格式

获取工作项列表。

调试

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

调试

授权信息

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

请求语法

GET /organization/{organizationId}/listWorkitems HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

organizationId

string

是

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

5ebbc0228123212b59xxxxx

请求参数

名称

类型

必填

描述

示例值

spaceType

string

是

资源类型

Project

spaceIdentifier

string

是

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

8fb83debd69a6c7c6626......

category

string

是

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

Req

nextToken

string

否

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

""

maxResults

string

否

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

20

conditions

string

否

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

{"conditionGroups":[]}

extraConditions

string

否

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

{"conditionGroups":[]}

groupCondition

string

否

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

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

orderBy

string

否

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

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

searchType

string

否

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

LIST

返回参数

名称

类型

描述

示例值

object

totalCount

integer

总数

10

nextToken

string

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

""

maxResults

integer

每页数量

20

requestId

string

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

ASSDS-ASSASX-XSAXSA-XSAXSAXS

errorMsg

string

错误信息

error

errorCode

string

错误码

Openapi.RequestError

success

boolean

true 或者 false

true

workitems

array<object>

工作项信息

object

identifier

string

工作项唯一标识

e8bxxxxxxxxxxxxxxxx23

subject

string

工作项标题

测试工作项

document

string

工作项内容,已废弃,请调用获取详情接口获取

修复登录页在网络异常时未显示提示的问题。

assignedTo

string

负责人的阿里云 accountID

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

状态唯一标识

100005

sprintIdentifier

string

迭代 id

75528f17703e92e5a568......

finishTime

integer

完成时间,使用 Unix 时间戳,单位为毫秒。

1699366778000

示例

正常返回示例

JSON格式

{
  "totalCount": 10,
  "nextToken": "\"\"",
  "maxResults": 20,
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMsg": "error",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "workitems": [
    {
      "identifier": "e8bxxxxxxxxxxxxxxxx23",
      "subject": "测试工作项",
      "document": "修复登录页在网络异常时未显示提示的问题。",
      "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

错误码

错误信息

描述

400 Openapi.RequestError request error OpenAPI请求数据错误
403 Operate.NoPermission NoPermission 没有权限

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

变更历史

更多信息,参考变更详情。