更新工作项的信息
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
POST /organization/organizationId/workitems/update HTTP/1.1
Content-Type:application/json
{
"propertyKey" : "String",
"propertyValue" : "String",
"identifier" : "String",
"fieldType" : "String"
}
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
organizationId | String | 是 | 5ebbc0228123212b59xxxxx |
企业标识,也称企业id,字符串形式,可在云效访问链接中获取,如https://devops.aliyun.com/organization/【OrganizationId】 |
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
propertyKey | String | 是 | subject |
要更新的字段identifier,可以从ListWorkItemAllFields获取 |
propertyValue | String | 是 | newValue |
更新后的值 |
identifier | String | 是 | e8b2xxxxxx2abdxxxxxxxx23 |
工作项唯一标识id |
fieldType | String | 是 | subject |
更新字段的类型,标题:subject/自定义字段:customField/状态:status/描述:document/user(包括负责人、参与人等用户类型的字段)/基本字段:basic(包括迭代等其他字段) |
响应体语法
HTTP/1.1 200 OK
Content-Type:application/json
{
"requestId" : "String",
"errorCode" : "String",
"errorMessage" : "String",
"success" : Boolean,
"workitem" : {
"identifier" : "String",
"subject" : "String",
"document" : "String",
"assignedTo" : "String",
"status" : "String",
"statusStageIdentifier" : "String",
"spaceIdentifier" : "String",
"spaceName" : "String",
"spaceType" : "String",
"logicalStatus" : "String",
"categoryIdentifier" : "String",
"parentIdentifier" : "String",
"workitemTypeIdentifier" : "String",
"updateStatusAt" : Long,
"serialNumber" : "String",
"gmtCreate" : Long,
"gmtModified" : Long,
"creator" : "String",
"modifier" : "String",
"statusIdentifier" : "String",
"sprintIdentifier" : "String"
}
}
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
requestId | String | ASSDS-ASSASX-XSAXSA-XSAXSAXS |
请求id,每次请求都是唯一值,便于后续排查问题 |
errorCode | String | Openapi.RequestError |
错误码 |
errorMessage | String | error |
错误信息 |
success | Boolean | true |
true或者false |
workitem | Object |
工作项信息 |
|
identifier | String | e8bxxxxxxxxxxxxxxxx23 |
工作项唯一标识 |
subject | String | 测试工作项 |
工作项标题 |
document | String | html格式 |
工作项内容 |
assignedTo | String | 19xx7043xxxxxxx914 |
负责人 |
status | String | 待处理 |
状态名称 |
statusStageIdentifier | String | 1 |
状态阶段id |
spaceIdentifier | String | e8b26xxxxx6e76aa20xxxxx23 |
所属项目id |
spaceName | String | 需求项目 |
所属项目名称 |
spaceType | String | Project |
项目类型 |
logicalStatus | String | NORMAL |
逻辑状态 |
categoryIdentifier | String | Req |
工作项的类型id |
parentIdentifier | String | e8bxxxxxxxxxxxxxxxx24 |
父工作项id |
workitemTypeIdentifier | String | 9uxxxxxxre573f5xxxxxx0 |
工作项类型id |
updateStatusAt | Long | 1640850328000 |
状态更新时间 |
serialNumber | String | ACFS-1 |
工作项编号 |
gmtCreate | Long | 1640850318000 |
创建时间 |
gmtModified | Long | 1640850318000 |
修改时间 |
creator | String | 19xx7043xxxxxxx914 |
创建人 |
modifier | String | 19xx7043xxxxxxx914 |
修改人 |
statusIdentifier | String | 111000 |
状态id |
sprintIdentifier | String | 75528f17703e92e5a568...... |
迭代id |
示例1
POST /organization/5ebbc0228123212b59xxxxx/workitems/update HTTP/1.1
Host:devops.aliyuncs.com
Content-Type:application/json
{
"propertyKey" : "subject",
"propertyValue" : "newValue",
"identifier" : "e8b2xxxxxx2abdxxxxxxxx23",
"fieldType" : "subject"
}
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateWorkItemResponse>
<success>true</success>
<errorMessage/>
<errorCode/>
<workitem>
<identifier>6fc04b35d8cb62128b55......</identifier>
<statusStageIdentifier>1</statusStageIdentifier>
<gmtModified>1645078744000</gmtModified>
<creator>1967043931......</creator>
<serialNumber>AVDC-2</serialNumber>
<spaceType>Project</spaceType>
<subject>testSubject</subject>
<document><p style="text-align: left;text-indent: 0;margin-left: 0;"><span></span></p></document>
<modifier>1967043931......</modifier>
<spaceIdentifier>8fb83debd69a6c7c6626......</spaceIdentifier>
<workitemTypeIdentifier>9uy29901re573f561d......</workitemTypeIdentifier>
<categoryIdentifier>Req</categoryIdentifier>
<gmtCreate>1644572109000</gmtCreate>
<assignedTo>1967043931......</assignedTo>
<spaceName>111122222233</spaceName>
<logicalStatus>NORMAL</logicalStatus>
<statusIdentifier>100005</statusIdentifier>
<status>待处理</status>
<sprintIdentifier>75528f17703e92e5a568......</sprintIdentifier>
</workitem>
</UpdateWorkItemResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"success" : true,
"errorMessage" : "",
"errorCode" : "",
"workitem" : {
"identifier" : "6fc04b35d8cb62128b55......",
"statusStageIdentifier" : "1",
"gmtModified" : 1645078744000,
"creator" : "1967043931......",
"serialNumber" : "AVDC-2",
"spaceType" : "Project",
"subject" : "testSubject",
"document" : "<p style=\"text-align: left;text-indent: 0;margin-left: 0;\"><span></span></p>",
"modifier" : "1967043931......",
"spaceIdentifier" : "8fb83debd69a6c7c6626......",
"workitemTypeIdentifier" : "9uy29901re573f561d......",
"categoryIdentifier" : "Req",
"gmtCreate" : 1644572109000,
"assignedTo" : "1967043931......",
"spaceName" : "111122222233",
"logicalStatus" : "NORMAL",
"statusIdentifier" : "100005",
"status" : "待处理",
"sprintIdentifier" : "75528f17703e92e5a568......"
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Openapi.RequestError | request error | OpenAPI请求数据错误 |
403 | Operate.NoPermission | NoPermission | 没有权限 |
访问错误中心查看更多错误码。
开发者资源
-
SDK
阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证。
-
OpenAPI Explorer
快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。
-
阿里云CLI
阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。