更新时间:2023-06-29 GMT+08:00

查询APP列表

功能介绍

查询APP列表。

URI

GET /v2/{project_id}/apic/instances/{instance_id}/apps

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。

instance_id

String

实例ID

表2 Query参数

参数

是否必选

参数类型

描述

offset

Long

偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0

缺省值:0

limit

Integer

每页显示的条目数量

最小值:1

最大值:500

缺省值:20

id

String

APP编号

name

String

APP名称

status

Integer

APP状态

app_key

String

APP的KEY

precise_search

String

指定需要精确匹配查找的参数名称,多个参数需要支持精确匹配时参数之间使用“,”隔开。

目前仅支持name。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

size

Integer

本次返回的列表长度

total

Long

满足条件的记录数

apps

Array of AppInfoWithBindNum objects

APP列表

表5 AppInfoWithBindNum

参数

参数类型

描述

id

String

编号

name

String

名称

remark

String

描述

creator

String

APP的创建者

  • USER:用户自行创建

  • MARKET:云市场分配

暂不支持MARKET

update_time

String

更新时间

app_key

String

APP的key

app_secret

String

密钥

register_time

String

注册时间

status

Integer

状态

  • 1: 有效

app_type

String

APP的类型:

  • apig:存量apig应用,不推荐使用

  • roma:roma集成应用

roma_app_type

String

ROMA_APP的类型:

  • subscription:订阅应用

  • integration:集成应用

bind_num

Integer

绑定的API数量

状态码: 400

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 401

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 404

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 500

表10 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

响应示例

状态码: 200

OK

{
  "total" : 2,
  "size" : 2,
  "apps" : [ {
    "id" : "356de8eb7a8742168586e5daf5339965",
    "name" : "app_demo",
    "remark" : "app example",
    "creator" : "USER",
    "update_time" : "2020-08-03T13:09:13Z",
    "app_key" : "ee8f878c252747028f07eb116c2cd91b",
    "app_secret" : "416**********ab8",
    "register_time" : "2020-08-03T13:09:13Z",
    "status" : 1,
    "app_type" : "roma",
    "roma_app_type" : "integration",
    "bind_num" : 0
  }, {
    "id" : "9ed8b7fe84224de681e7d7a5587e76dc",
    "name" : "app_001",
    "remark" : "remark",
    "creator" : "USER",
    "update_time" : "2020-05-27T10:38:03.133586Z",
    "app_key" : "840b8b5b1efc4ec686639759c2c584da",
    "app_secret" : "0a4**********c6e",
    "register_time" : "2020-03-28T11:09:06Z",
    "status" : 1,
    "app_type" : "roma",
    "roma_app_type" : "integration",
    "bind_num" : 3
  } ]
}

状态码: 400

Bad Request

{
  "error_code" : "APIG.2011",
  "error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
}

状态码: 401

Unauthorized

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}

状态码: 403

Forbidden

{
  "error_code" : "APIG.1005",
  "error_msg" : "No permissions to request this method"
}

状态码: 404

Not Found

{
  "error_code" : "APIG.3030",
  "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec"
}

状态码: 500

Internal Server Error

{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}

状态码

状态码

描述

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

错误码

请参见错误码