获取项目列表,支持条件搜索。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /organization/{organizationId}/listProjects HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】 |
5ebbc0228123212b59xxxxx |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| extraConditions |
string |
否 |
|
附加过滤条件 |
| conditions |
string |
否 |
过滤条件 |
{ "conditionGroups": [ [] ] } |
| category |
string |
是 |
项目类型,这里填 Project 即可 |
Project |
| nextToken |
string |
否 |
第一页值不需要填写,后面每一页的值需要从前一次调用结果中获取到此字段,然后获取后面的分页数据 |
"" |
| maxResults |
integer |
否 |
每页最大返回数量,0-200,默认值 20 |
20 |
| scope |
string |
否 |
公开类型,all/collect,分别代表所有的项目或者我收藏的 |
all |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
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 |
| projects |
array<object> |
项目信息 |
|
|
object |
|||
| creator |
string |
创建人 aliyunPK |
19xx7043xxxxxxx914 |
| customCode |
string |
自定义编号,企业下唯一 |
OJAY |
| deleteTime |
integer |
删除时间 |
1640865094000 |
| description |
string |
描述信息 |
用于演示项目管理功能的示例项目。 |
| gmtCreate |
integer |
创建时间 |
1640778694000 |
| icon |
string |
项目封面 |
https://xxxxxx.png |
| identifier |
string |
项目唯一标识符 |
e8bxxxxxxxxxxxxxxxx23 |
| name |
string |
项目名称 |
示例项目 |
| scope |
string |
公开还是私有 |
public |
| typeIdentifier |
string |
类型 id |
null |
| statusStageIdentifier |
string |
状态阶段 |
null |
| logicalStatus |
string |
逻辑状态 |
null |
| categoryIdentifier |
string |
资源大类型 |
Project |
示例
正常返回示例
JSON格式
{
"totalCount": 10,
"nextToken": "\"\"",
"maxResults": 20,
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMsg": "error",
"errorCode": "Openapi.RequestError",
"success": true,
"projects": [
{
"creator": "19xx7043xxxxxxx914",
"customCode": "OJAY",
"deleteTime": 1640865094000,
"description": "用于演示项目管理功能的示例项目。",
"gmtCreate": 1640778694000,
"icon": "https://xxxxxx.png",
"identifier": "e8bxxxxxxxxxxxxxxxx23",
"name": "示例项目",
"scope": "public",
"typeIdentifier": "null",
"statusStageIdentifier": "null",
"logicalStatus": "null",
"categoryIdentifier": "Project"
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Openapi.RequestError | request error | OpenAPI请求数据错误 |
| 403 | Operate.NoPermission | NoPermission | 没有权限 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。