
# 查询APP列表 - ListAppsV2
#### 功能介绍
查询APP列表。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/ROMA/doc?api=ListAppsV2)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-roma/roma_06_0018.html)。
#### URI
GET /v2/{project_id}/apic/instances/{instance_id}/apps
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                  |
|:---|:---|:---|:---|
| project_id  | 是    | String | 项目ID，获取方式请参见API参考的"附录 \> 获取项目ID"章节。 |
| instance_id | 是    | String | 实例ID                                |
表2Query参数 
| 参数             | 是否必选 | 参数类型    | 描述                                                   |
|:---|:---|:---|:---|
| offset         | 否    | Long    | 偏移量，表示从此偏移量开始查询，偏移量小于0时，自动转换为0                       |
| limit          | 否    | Integer | 每页显示的条目数量                                            |
| id             | 否    | String  | APP编号                                                |
| name           | 否    | String  | APP名称                                                |
| status         | 否    | Integer | APP状态 - 1：有效                                         |
| 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列表     |
   
 表5AppInfoWithBindNum 
| 参数            | 参数类型    | 描述                                                  |
|:---|:---|:---|
| 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 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-roma/ErrorCode.html)。
