全部产品

分类管理

查询smartGroup

API:

ListSmartGroup

请求参数

参数

类型

是否必须

说明

OrgId

string

企业Id

ProjectId

string

项目 ID

{
    "Successful": true,
    "ErrorCode": null,
    "ErrorMsg": null,
    "Object": {
         {
            "Id": "5fbdf5185a7f63004411111",
            "Type": "sprint"
        },
        {
            "Id": "5fbdf5185a7f6300441111",
            "Type": "bug"
        },
        {
            "Id": "5fbdf5185a7f630044a01111",
            "Type": "story"
        }
    },
    RequestId": null
}

返回参数说明

参数

说明

└ Id

SmartGroup ID

└Type

SmartGroup 类型

示例代码

       String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         DefaultProfile profile = DefaultProfile.getProfile(
            "cn-hangzhou",          // 地域ID
            "<ak>",      
            "<sk>");    
        IAcsClient client = new DefaultAcsClient(profile);
        String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         ListSmartGroupRequest listSmartGroupRequest = new ListSmartGroupRequest();
        listSmartGroupRequest.setEndpoint(endPoint);
        listSmartGroupRequest.setOrgId("33333333333333333333333");
        listSmartGroupRequest.setProjectId("3333333");
        ListSmartGroupResponse acsResponse = client.getAcsResponse(listSmartGroupRequest);

查询分类

API:

ListCommonGroup

请求参数

参数

类型

是否必须

说明

OrgId

string

企业Id

ProjectId

string

项目 ID

SmartGroupId

string

SmartGroupId参考 查询SmartGroup接口

All

Boolean

是否查询所有是查

{
    "Successful": true,
    "ErrorCode": null,
    "ErrorMsg": null,
    "Object": {
         {
            "Id": "5fbdf522bbb165001cd8b3bb",
            "Name": "未分类需求",
            "Pinyin": "default",
            "Description": null,
            "CreatorId": "5e9ee108424a50d98c7c8906",
            "IsRoot": true,
            "Pos": -1,
            "ResourceCount": 0,
            "ProjectId": "5fbdf5185a7f630044a0c7a6",
            "SmartGroupId": "5fbdf5185a7f630044a0c7a9"
        }
    },
    RequestId": null
}

返回参数说明

参数

说明

└ id

分类id

└Name

分类名称

└Pinyin

分类名称拼音

└Description

描述

└CreatorId

创建人id

└IsRoot

是否根分类

└Pos

排序位置

└ResourceCount

分类下资源数 例如缺陷分类下的缺陷数

└ProjectId

项目id

└SmartGroupId

SmartGroupId

示例代码

  String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         DefaultProfile profile = DefaultProfile.getProfile(
            "cn-hangzhou",          // 地域ID
            "<ak>",      
            "<sk>");    
        IAcsClient client = new DefaultAcsClient(profile);
        String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
        ListCommonGroupRequest listCommonGroupRequest = new ListCommonGroupRequest();
        listCommonGroupRequest.setSysEndpoint(endPoint);
        listCommonGroupRequest.setOrgId("333333");
        listCommonGroupRequest.setProjectId("333333");
        listCommonGroupRequest.setSmartGroupId("333333");
        listCommonGroupRequest.setAll(true);
        ListCommonGroupResponse acsResponse = client.getAcsResponse(listCommonGroupRequest);

创建分类

API:

CreateCommonGroup

请求参数

参数

类型

是否必须

说明

OrgId

string

企业Id

ProjectId

string

项目 ID

SmartGroupId

string

SmartGroupId参考 查询SmartGroup接口

Name

string

名称

Description

string

描述

{
    "Successful": true,
    "ErrorCode": null,
    "ErrorMsg": null,
    "Object": {
         {
            "Id": "5fbdf522bbb165001cd8b3bb"
        }
    },
    RequestId": null
}

返回参数说明

参数

说明

└ Id

分类id

      String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         DefaultProfile profile = DefaultProfile.getProfile(
            "cn-hangzhou",          // 地域ID
            "<ak>",      
            "<sk>");    
        IAcsClient client = new DefaultAcsClient(profile);
        String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         CreateCommonGroupRequest createCommonGroupRequest = new CreateCommonGroupRequest();
        createCommonGroupRequest.setSysEndpoint(endPoint);
        createCommonGroupRequest.setOrgId("33333");
        createCommonGroupRequest.setProjectId("333333");
        createCommonGroupRequest.setSmartGroupId("3333333");
        createCommonGroupRequest.setName(UuidUtil.buildRandomUuidString());
        createCommonGroupRequest.setDescription("ceshi");
        CreateCommonGroupResponse acsResponse = client.getAcsResponse(createCommonGroupRequest);

删除分类

API:

DeleteCommonGroup

请求参数

参数

类型

是否必须

说明

OrgId

string

企业Id

ProjectId

string

项目 ID

CommonGroupId

string

分类id

{
    "Successful": true,
    "ErrorCode": null,
    "ErrorMsg": null,
    "Object": {
         {
            "Id": "5fbdf522bbb165001cd8b3bb"
        }
    },
    RequestId": null
}

返回参数说明

参数

说明

└ Id

分类id

   String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         DefaultProfile profile = DefaultProfile.getProfile(
            "cn-hangzhou",          // 地域ID
            "<ak>",      
            "<sk>");    
        IAcsClient client = new DefaultAcsClient(profile);
        String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
           DeleteCommonGroupRequest deleteCommonGroupRequest = new DeleteCommonGroupRequest();
        deleteCommonGroupRequest.setSysEndpoint(endPoint);
        deleteCommonGroupRequest.setOrgId("SSSS");
        deleteCommonGroupRequest.setProjectId("SSS");
        deleteCommonGroupRequest.setCommonGroupId("SSSSS");
        DeleteCommonGroupResponse acsResponse = client.getAcsResponse(deleteCommonGroupRequest);

更新分类

API:

CreateCommonGroup

请求参数

参数

类型

是否必须

说明

OrgId

string

企业Id

ProjectId

string

项目 ID

SmartGroupId

string

SmartGroupId参考 查询SmartGroup接口

CommonGroupId

string

分类id

Name

string

名称

Description

string

描述

{
    "Successful": true,
    "ErrorCode": null,
    "ErrorMsg": null,
    "Object": {
         {
            "Id": "5fbdf522bbb165001cd8b3bb"
        }
    },
    RequestId": null
}

返回参数说明

参数

说明

└ Id

分类id

  String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
         DefaultProfile profile = DefaultProfile.getProfile(
            "cn-hangzhou",          // 地域ID
            "<ak>",      
            "<sk>");    
        IAcsClient client = new DefaultAcsClient(profile);
        String endPoint = "api-devops.cn-hangzhou.aliyuncs.com";
        UpdateCommonGroupRequest updateCommonGroupRequest = new UpdateCommonGroupRequest();
        updateCommonGroupRequest.setSysEndpoint(endPoint);
        updateCommonGroupRequest.setOrgId("eeee");
        updateCommonGroupRequest.setProjectId("eee");
        updateCommonGroupRequest.setSmartGroupId("eee");
        updateCommonGroupRequest.setName(name);
        updateCommonGroupRequest.setCommonGroupId("eee");
        UpdateCommonGroupResponse acsResponse = client.getAcsResponse(updateCommonGroupRequest);