文档

项目管理API

更新时间:
一键部署

项目相关的接口如下:

创建工作项

方法名:CreateWorkitem

描述

查看您在云效中创建的项目列表。

入参

TemplateId:模版的ID,必传

CorpIdentifier: 企业标识符,必传

Author:作者,填写作者的工号或者邮箱,必传

AssignedTo:指派者,填写指派者的工号或者邮箱,必传

Subject:工作项标题,必传

Description:工作项描述信息,非必传

Stamp:可选值有Bug(缺陷)、Req(需求)、Task(任务),必传

AKProjectId:归属项目,必传

CfList:自定义属性,非必传

Verifier:验证者,非必传

PriorityId: 优先级,非必传

SeriousLevelId:严重程度,非必传

WatcherUsers:跟踪者,非必传

ModuleIds:模块,非必传

出参

{ "Data": 980466, "RequestId": "C092691F-4196-4EBC-BCED-4108EAFDE2B7", "Success": true, "Code": 0 }

查询工作项详情

方法名:GetWorkitemById

入参

Id:工作项id,必传

CorpIdentifier: 企业标识符,必传

出参

{ "Data": { "AssignedToMaps": [], "User": "润谨", "IgnoreIntegrate": false, "ModuleIds": [], "VersionIds": [], "Guid": "o3rzrxshfsoo6iwh", "AssignedToIds": "11726781", "VerifierStaffId": "aliyun_037642", "AssignedToIdList": [ 11726781 ], "VerifierId": 11726781, "AkProjectId": 153367, "CommitDate": 1537459200000, "SkipCollab": false, "TemplateId": 4, "PriorityId": 96, "SendWangwang": true, "BlackListNotice": [], "IssueTypeId": 26, "RegionId": 1148, "Attachmented": false, "Id": 1023527, "RelatedAKProjectIds": [], "RelatedAKProjectGuids": [], "ModuleList": [], "RelatedUserIds": [ 11726781, 11726781, 11726781 ], "Verifier": "润谨", "RecordChangeLog": true, "ModuleUpdated": false, "TrackerIds": [], "Stamp": "Bug", "StatusId": 28, "ProjectIds": [], "AssignedToStaffId": "aliyun_037642", "TagIdList": [], "IgnoreCheck": false, "SeriousLevelId": 89, "CfsList": [ { "Name": "开发产生原因", "Value": "23121131321", "Type": "text", "Id": "126" }, { "Name": "缺陷处理简述", "Value": "22213131231", "Type": "text", "Id": "127" }, { "Name": "预计工时", "Value": "1", "Type": "float", "Id": "101586" }, { "Name": "实际工时", "Value": "0", "Type": "float", "Id": "101587" } ], "AssignedToId": 11726781, "CreatedAt": 1537528617000, "UpdatedAt": 1537528617000, "UserStaffId": "aliyun_037642", "Subject": "444444", "Trackers": [], "AttachmentIds": [], "Watched": false, "UserId": 11726781, "AssignedTo": "润谨", "ChangeLogList": [], "LogicalStatus": "normal", "Priority": "3-Medium", "Status": "New", "StatusStage": 1, "CommentList": [], "AttachmentList": [], "VersionList": [], "SeriousLevel": "3-Normal" }, "RequestId": "DEB7A3AD-3CD3-4824-A8CA-C12DD8297908", "Success": true, "Code": 0 }

更新工作项

方法名:UpdateWorkitem

入参

CorpIdentifier 企业标识符,必填    
Modifier 当前修改人,必填    
IssueId 工作项id,必填 
AkProjectId 项目id,必填 
AssignedTo 指派者,非必填    
TemplateId 模板id,非必填    
Subject 标题,非必填    
Description 内容详情,非必填    
Stamp 类型,非必填 
CfList 自定义属性,非必填    
Status 状态,非必填 
Priority,优先级,非必填    
SeriousLevel,严重程度,非必填    
Verifier,验证者,非必填    
SprintId,迭代id,非必填

出参

{ "Code": 0, "Data": true, "Success": true }

根据项目搜索工作项

方法名:SearchWorkitem

入参

Stamp:类型,非必填 
AKProjectId:项目id,必填 
ToPage:第几页,非必填 
PageSize: 每页大小,非必填 
CorpIdentifier: 企业标识符,必填
SprintId: 迭代id,非必填

出参

{ "code": 0, "data": [{ "sourceId": 0, "trackers": [], "closedDuration": 0, "sendWangwang": true, "verifierId": 11726781, "issueRelations": "", "moduleUpdated": false, "seriousLevel": "3-Normal", "subject": "444444", "attachmented": false, "source": "top", "akPaths": [153367, 157100], "templateId": 4, "priorityId": 96, "createdAt": 1537528617000, "testsuiteId": 0, "solution": 0, "statusStage": 1, "respondDuration": 0, "watcherIdList": [], "trackerIds": [], "seriousLevelId": 89, "versionList": [], "id": 1023527, "verifierStaffId": "aliyun_037642", "updatedAt": 1537528617000, "relatedAKProjectGuids": [], "scopeUserIds": [11726781], "priority": "3-Medium", "relatedAKProjectIds": [], "commitDate": 1537459200000, "devDuration": 0, "fixedDuration": 0, "blackListNotice": [], "sprintId": 0, "versionId": 0, "watched": false, "idPath": "", "moduleList": [], "statusId": 28, "assignedToIdList": [11726781], "userStaffId": "aliyun_037642", "attachmentIds": [], "recordChangeLog": true, "region": "581566a6-8012-44f0-8f13-04d1608bf952", "projectId": 17, "skipCollab": false, "tagIdList": [], "status": "New", "assignedToId": 11726781, "commentList": [], "versionIds": [1238394], "stamp": "Bug", "akVersionIds": [], "projectIds": [], "changeLogList": [], "assignedTo": "润谨", "ignoreIntegrate": false, "moduleIds": [], "issueTypeId": 26, "attachmentList": [], "logicalStatus": "normal", "scope": 0, "assignedToIds": "11726781", "assignedToStaffId": "aliyun_037642", "userId": 11726781, "linePath": "70000,40652886,17", "parentId": 0, "fixedUserId": 0, "ignoreCheck": false, "verifier": "润谨", "akProjectId": 153367, "relatedUserIds": [11726781, 11726781, 11726781], "user": "润谨" }], "success": true, "requestId": "5C887037-3D99-4F1C-8F44-8722952C0DEF" }

创建项目

方法名:CreateProject

入参:

CorpIdentifier 企业标识符,必填 
StaffId    创建者工号,必填 
Region    企业标识符,必填 
ParamJson 创建项目所需参数,必填

paramJson参数如下:

参数名

类型

说明

示例值

name

String

必填,项目名

“测试项目”

icon

String

项目图标URL链接,为空时默认为系统默认图标

“https://gtms04.alicdn.com/tps/i4/TB1NXh5LFXXXXcWXXXXjf1M_VXX-240-180.png”

description

String

项目描述

“Aone新版1期”

mode

String

必填,项目模式:public–公开;private–私有

“public”

deptNo

Integer

主数据中部门ID

234

parentId

Integer

父项目ID

12

projectSetIds

List

所属项目集ID列表

1,2

stamp

String

必填,项目类型:研发项目–research;业务空间–business

“bussiness”

members

String v成员JSON对象

{“ak.akproject.member”:“101080”,“026812”,“ak.akproject.admin”:“084205”,“101080”}

services

String

服务标识符(identifier)字符串,如任务—task,需求—req

“task,req,issue”

出参:

{ "Code": 0, "Data": 1, "Success": true }

获取项目信息

方法名:GetProjectInfo

入参:

CorpIdentifier 企业标识符,必填
ProjectId 项目id,必填

出参:

{ "Data": { "Description": "", "ParentId": 0, "Creator": { "StaffId": "aliyun_002555" }, "Type": "project", "Modifier": { "StaffId": "aliyun_002555" }, "GmtCreate": "2017-12-06 10:43:51", "Mode": "public", "GmtModified": "2017-12-06 10:43:51", "Name": "权限测试项目", "ProjectMembers": [ { "Name": "管理员", "Users": [ { "StaffId": "aliyun_000112" }, { "StaffId": "aliyun_002555" } ], "Id": 1000576, "Identifier": "ak.akproject.admin" } ], "Status": "active", "Region": "mzssehhrbcjesf61", "Stamp": "research", "IdPath": "154067", "Id": 154067, "CustomValues": [] }, "RequestId": "D6F178B2-334C-4800-8742-F94A95FF65B0", "Success": true, "Code": 0 }

更新项目

方法名:UpdateProject

入参:

CorpIdentifier 企业标识符,必填
StaffId    创建者工号,必填
ParamJson 创建项目所需参数,必填

出参:

{ "Code": 0, "Data": true, "Success": true }

搜索企业下的项目

方法名:SearchProjectsByRegion

入参:

CorpIdentifier 企业标识符,必填 
Region    企业标识符,必填 
Status 状态,非必填
ToPage 第几页,非必填
PageSize 每页大小,非必填

出参:

{ "Data": [ { "Name": "moyu-rdc-project-003", "Status": "active", "ParentId": 0, "Stamp": "research", "Type": "project", "FullName": "moyu-rdc-project-003", "IdPath": "158273", "Id": 158273, "Mode": "private" },...

]

}

添加项目成员

方法名:AddProjectMembers

入参:

CorpIdentifier 企业标识符,必填
ProjectId 项目id,必填
Role 角色,可用角色标识符或者角色名,管理员-ak.akproject.admin;参与人-ak.akproject.member,必填
MemberStaffIds 新增用户工号列表    示例["aliyun_00002","aliyun_0003"],必填
StaffId    操作者工号,必填

出参:

{ "Code": 0, "Data": true, "Success": true }

获取项目成员

方法名:GetProjectMembers

入参:

CorpIdentifier 企业标识符,必填 
ProjectId 项目id,必填
StaffId    操作者工号,必填

出参:

{ "Data": [ { "Name": "管理员",

"Id": 100032, "Identifier": "ak.akproject.member" "Users": [ { "StaffId": "aliyun_xxx", "NickName": "aaaaa", "Avatar": "https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_handsome.jpg", "Id": 11726674, "RealName": "武小平" }, { "StaffId": "aliyun_yyyyy", "NickName": "bbbbb", "Avatar": "https://g.alicdn.com/aone-assets/usercenter-frontend/0.1.7/images/default-avatar.png", "Id": 11741302, "RealName": "张凯" }] } ], "RequestId": "6EA22433-B81B-4A2B-AEA8-40F83679C178", "Success": true, "Code": 0 }

根据模板获取启用的自定义属性

方法名:GetCustomFieldsByTemplateId

入参:

CorpIdentifier 企业标识符,必填
AKProjectId 项目id,必填
TemplateId    模板id,必填

出参:

{ "Data": [ { "UpdatedAt": 1498098057000, "Description": "BUG产生原因", "IsRequired": false, "NameI18N": "开发产生原因", "Type": "IssueCustomField", "IsDelete": false, "Other": "{\"roles\":[]}", "DefaultValue": "", "IsRemember": false, "Editable": true, "Name": "开发产生原因", "MaxLength": 0, "Dynamic": false, "Id": 126, "MinLength": 0, "CreatedAt": 1498098057000, "FieldFormat": "text" }, { "UpdatedAt": 1498098057000,       "Description": "缺陷处理简述", "IsRequired": false, "NameI18N": "缺陷处理简述", "Type": "IssueCustomField", "IsDelete": false, "Other": "{\"roles\":[]}", "DefaultValue": "", "IsRemember": false, "Editable": true, "Name": "缺陷处理简述", "MaxLength": 0, "Dynamic": false, "Id": 127, "MinLength": 0, "CreatedAt": 1498098057000, "FieldFormat": "text" } ], "RequestId": "C7D2C7CD-F418-4390-8188-A0F527237EC3", "Success": true, "Code": 0 }
  • 本页导读 (0)