获取应用列表
功能介绍
获取我创建的应用列表 当前只支持查询我创建的应用,其中请求参数is_created_by_self需为true
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v6/applications
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
attention | 否 | Boolean | 是否查询我关注的应用 |
region_id | 否 | String | 区域id,从控制台获取方法请参见: 获取区域ID |
keyword | 否 | String | 搜索关键字,支持按名称和描述搜索,默认null |
project_id | 否 | String | 所属CodeArts项目id,从 项目列表接口 查询。 |
topic_id | 否 | String | 主题id,场景或者部署方式分类id |
is_created_by_self | 否 | Boolean | 是否查询由我创建 |
sort_key | 否 | Array | 排序字段, name:应用名称,created_at:创建时间,updated_at:更新时间 |
sort_dir | 否 | Array | 排序方式, desc:降序, asc:升序 |
limit | 否 | Integer | 每页显示的条目数量,默认10 |
offset | 否 | Integer | 偏移量,表示从此偏移量开始查询,默认0 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Language | 否 | String | 语言类型 中文:zh-cn 英文:en-us |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
applications | Array of ApplicationV3 objects | 应用列表 |
count | Integer | 应用列表总条数 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 应用id |
name | String | 应用名称 |
description | String | 应用描述 |
region_id | String | 区域id |
region_name | String | 区域名称 |
project_id | String | 所属项目id |
project_name | String | 项目名称 |
icon | String | 应用图标 |
pipeline_creation_result | Array of PipelineCreationResult objects | 流水线列表 |
repository_creation_result | RepositoryCreationResult object | 仓库信息 |
environment_creation_result | Array of strings | 环境信息 |
template_types | Array of strings | 模板类型 |
template_deployment | String | 模板部署信息 |
deploy_type | String | 部署类型, function:函数部署,cci:cci容器部署,ServiceStage(Jar):ServiceStage jar包部署,ServiceStage(Docker):ServiceStage Docker容器部署,none不支持部署 |
creator_name | String | 创建者名称 |
created_at | String | 创建时间 |
updated_at | String | 更新时间 |
version | String | 应用版本号 |
参数 | 参数类型 | 描述 |
|---|---|---|
pipeline | PipelineBasic object | 流水线资源信息 |
task_id | String | 任务id |
status | String | 任务状态, success:成功,failed:失败,creating:创建中,cancel:取消,pending:等待创建 |
failure_reason | String | 失败原因 |
参数 | 参数类型 | 描述 |
|---|---|---|
uuid | String | DevStar系统生成的流水线UUID |
id | String | CloudPipeline系统对应流水线ID |
name | String | 流水线名称 |
url | String | 流水线地址 |
last_running_status | String | 流水线最后一次运行状态,success:成功,failed:失败,running:运行中 |
参数 | 参数类型 | 描述 |
|---|---|---|
repository | RepositoryBasicInfo object | 仓库 |
task_id | String | 任务id |
status | String | 任务状态, success:成功,failed:失败,creating:创建中 |
failure_reason | String | 失败原因 |
请求示例
请求uri示例
GET https://{endpoint}/v6/applications?offset=0&limit=5&is_created_by_self=true®ion_id=cn-north-7&sort_key=created_at&sort_dir=desc 响应示例
状态码: 200
ok
{
"applications" : [ {
"id" : "0633650ed8a7e69212eed4c348eb6b8d",
"name" : "应用名称",
"description" : "应用描述",
"creator_name" : "张三",
"created_at" : "2021-03-25T02:35:13Z",
"updated_at" : "2021-03-25T02:35:13Z",
"region_id" : "cn-north-7",
"region_name" : "区域名称",
"project_id" : "2633650ed8a7e69212eed4c348eb6b8d",
"project_name" : "所属项目名称",
"icon" : "应用图片",
"template_types" : [ "mobile" ],
"pipeline_creation_result" : [ {
"pipeline" : {
"id" : "0633650ed8a7e69212eed4c348eb6b8d",
"last_running_status" : "success"
},
"status" : "success",
"failure_reason" : ""
} ],
"repository_creation_result" : {
"repository" : {
"id" : "0633650ed8a7e69212eed4c348eb6b8d",
"ssh_url" : "git@codehub.xxx.xxx.xxx.com:zhangsan/myrepo.git",
"https_url" : "https://codehub.xxx.xxx.xxx.com/zhangsan/myrepo.git"
},
"status" : "success",
"failure_reason" : ""
},
"environment_creation_result" : [ "dev_env", "pre_env", "product_env" ]
} ],
"count" : 50
} 状态码: 400
Bad Request
{
"error_code" : "DEVSTAR.1001",
"error_msg" : "project_id : 非法参数"
} 状态码: 401
Unauthorized
{
"error_code" : "DEV.00000001",
"error_msg" : "未识别到用户认证信息"
} 状态码: 403
Forbidden
{
"error_code" : "DEVSTAR.1034",
"error_msg" : "无操作权限"
} 状态码
状态码 | 描述 |
|---|---|
200 | ok |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
错误码
请参见错误码。

