文档

GetWorkItemWorkFlowInfo - 获取工作项工作流信息

更新时间:

获取工作项工作流信息。

调试

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

授权信息

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

请求语法

GET /organization/{organizationId}/workitems/{workitemId}/getWorkflowInfo

请求参数

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

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

5ebbc0228123212b59xxxxx
configurationIdstring

对应工作项类型的工作流配置 id,该值可以从页面接口请求:https: //devops.aliyun.com/projex/api/workitem/workitemType/setting/space/getSpaceWorkitemTypeScope?spaceType=Project&spaceIdentifier=c595d0c3df4c743ac811......&workitemTypeIdentifier=ba102e46bc6a8483...... 中获取。对应的字段值在 result-> configurations-> 中 configType 为 Workflow 的 identifier。

711d33c738b9171c45fa......
workitemIdstring

工作项 id,同 workitemIdentifier 字段,工作项唯一标识

fd0xxxxx00d355b05df60xxxx

返回参数

名称类型描述示例值
object

工作项请求结果

requestIdstring

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

ASSDS-ASSASX-XSAXSA-XSAXSAXS
errorCodestring

错误码

Openapi.RequestError
errorMessagestring

错误信息

error
successboolean

true 或者 false

true
workflowobject

工作项信息

identifierstring

工作流唯一标识

e8bxxxxxxxxxxxxxxxx23
namestring

工作流名称

名称
descriptionstring

工作流的描述

工作流的描述
ownerSpaceIdentifierstring

工作流所属的团队空间或项目的 identifier

e8b26xxxxx6e76aa20xxxxx23
ownerSpaceTypestring

工作流所属的团队项目类型

null
defaultStatusIdentifierstring

工作流的默认状态 id,具体的工作流列表在 statuses 状态列表里。

100005
statusOrderstring

工作流的状态顺序

null
resourceTypestring

资源来源,项目工作流:Project、工作项工作流:Workitem

Project
sourcestring

工作流来源,system 系统自带的,organization 企业配置的工作流,custom 项目或者团队自定义

system
gmtCreatelong

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

1640850318000
gmtModifiedlong

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

1640850318000
creatorstring

创建人的阿里云 accountId

19xx7043xxxxxxx914
modifierstring

修改人的阿里云 accountId

19xx7043xxxxxxx914
workflowActionsobject []

工作流的流转步骤

idlong

流转步骤的 id

16274887
namestring

action 的名称

xxx
workflowIdentifierstring

action 对应的工作流

fd0xxxxxd00d355b05dxxxx26
workflowStatusIdentifierstring

action 对应的当前状态 id

100005
nextWorkflowStatusIdentifierstring

action 对应的下个状态的信息 id

100011
statusesobject []

状态列表

identifierstring

状态唯一标识

156603
namestring

状态名

待处理
workflowStageNamestring

阶段信息-名称

确认阶段
workflowStageIdentifierstring

阶段信息-阶段的唯一标识

1
sourcestring

状态来源,system:系统默认的、custom:企业/项目或者团队新建的

system
gmtCreatelong

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

1613805843000
gmtModifiedlong

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

1613805843000
creatorstring

创建人阿里云 accountId

19xx7043xxxxxxx914
modifierstring

修改人阿里云 accountId

19xx7043xxxxxxx914
descriptionstring

描述信息

xxx
resourceTypestring

状态作用的资源类型,项目:Project、工作项:Workitem

Workitem

示例

正常返回示例

JSON格式

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorCode": "Openapi.RequestError",
  "errorMessage": "error",
  "success": true,
  "workflow": {
    "identifier": "e8bxxxxxxxxxxxxxxxx23",
    "name": "名称",
    "description": "工作流的描述",
    "ownerSpaceIdentifier": "e8b26xxxxx6e76aa20xxxxx23",
    "ownerSpaceType": "null",
    "defaultStatusIdentifier": "100005",
    "statusOrder": "null",
    "resourceType": "Project",
    "source": "system",
    "gmtCreate": 1640850318000,
    "gmtModified": 1640850318000,
    "creator": "19xx7043xxxxxxx914",
    "modifier": "19xx7043xxxxxxx914",
    "workflowActions": [
      {
        "id": 16274887,
        "name": "xxx",
        "workflowIdentifier": "fd0xxxxxd00d355b05dxxxx26",
        "workflowStatusIdentifier": "100005",
        "nextWorkflowStatusIdentifier": "100011"
      }
    ],
    "statuses": [
      {
        "identifier": "156603",
        "name": "待处理",
        "workflowStageName": "确认阶段",
        "workflowStageIdentifier": "1",
        "source": "system",
        "gmtCreate": 1613805843000,
        "gmtModified": 1613805843000,
        "creator": "19xx7043xxxxxxx914",
        "modifier": "19xx7043xxxxxxx914",
        "description": "xxx",
        "resourceType": "Workitem"
      }
    ]
  }
}

错误码

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

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

变更历史

变更时间变更内容概要操作
2022-10-28OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:403
  • 本页导读 (0)
文档反馈