
# 查看API已绑定的APP列表
#### 功能介绍
查询API绑定的APP列表。
#### URI
GET /v1/{project_id}/apic/instances/{instance_id}/app-auths/binded-apps
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                  |
|:---|:---|:---|:---|
| project_id  | 是    | String | 项目ID，获取方式请参见API参考的"附录 \> 获取项目ID"章节。 |
| instance_id | 是    | String | 实例ID                                |
   
表2Query参数 
| 参数       | 是否必选 | 参数类型    | 描述                             |
|:---|:---|:---|:---|
| offset   | 否    | Long    | 偏移量，表示从此偏移量开始查询，偏移量小于0时，自动转换为0 |
| limit    | 否    | Integer | 每页显示的条目数量                      |
| api_id   | 否    | String  | API编号                          |
| app_name | 否    | String  | APP名称                          |
| app_id   | 否    | String  | APP编号                          |
| env_id   | 否    | String  | 环境编号                           |
   
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                       |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token。通过调用IAM服务获取用户Token接口获取（响应消息头中X-Subject-Token的值）。 |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数    | 参数类型                                                                           | 描述         |
|:---|:---|:---|
| total | Integer                                                                        | 符合条件的API总数 |
| size  | Integer                                                                        | 本次返回的列表长度  |
| auths | Array of [V1ApiAuthInfo] objects | 本次返回的API列表 |
   
 表5V1ApiAuthInfo 
| 参数             | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|
| id             | String           | 授权关系编号                                                                                                                                                                                                                                                                                                                                                                                                                |
| api_id         | String           | API的编号                                                                                                                                                                                                                                                                                                                                                                                                                |
| api_name       | String           | API的名称                                                                                                                                                                                                                                                                                                                                                                                                                |
| group_name     | String           | API绑定的分组名称                                                                                                                                                                                                                                                                                                                                                                                                            |
| api_type       | Integer          | API类型                                                                                                                                                                                                                                                                                                                                                                                                                 |
| api_remark     | String           | API的描述信息                                                                                                                                                                                                                                                                                                                                                                                                              |
| env_id         | String           | api授权绑定的环境ID                                                                                                                                                                                                                                                                                                                                                                                                          |
| auth_role      | String           | 授权者                                                                                                                                                                                                                                                                                                                                                                                                                   |
| auth_time      | String           | 授权创建的时间                                                                                                                                                                                                                                                                                                                                                                                                               |
| app_name       | String           | APP的名称                                                                                                                                                                                                                                                                                                                                                                                                                |
| app_remark     | String           | APP的描述                                                                                                                                                                                                                                                                                                                                                                                                                |
| app_type       | String           | APP的类型： - apig：存量apic客户端，新建实例不支持此类型   - roma：roma集成客户端    |
| app_creator    | String           | APP的创建者，取值如下： - USER：租户自己创建   - MARKET：API市场分配，暂不支持       |
| publish_id     | String           | API的发布编号                                                                                                                                                                                                                                                                                                                                                                                                              |
| group_id       | String           | API绑定的分组ID                                                                                                                                                                                                                                                                                                                                                                                                            |
| auth_tunnel    | String           | 授权通道类型 - NORMAL：普通通道   - GREEN：绿色通道                       |
| auth_whitelist | Array of strings | 绿色通道的白名单配置                                                                                                                                                                                                                                                                                                                                                                                                            |
| auth_blacklist | Array of strings | 绿色通道的黑名单配置                                                                                                                                                                                                                                                                                                                                                                                                            |
| visit_param    | String           | 访问参数。                                                                                                                                                                                                                                                                                                                                                                                                                 |
| roma_app_type  | String           | ROMA_APP的类型： - subscription：订阅应用   - integration：集成应用     |
| envname        | String           | api授权绑定的环境                                                                                                                                                                                                                                                                                                                                                                                                            |
| appid          | String           | APP的编号                                                                                                                                                                                                                                                                                                                                                                                                                |
   
**状态码：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" : 1,
  "size" : 1,
  "auths" : [ {
    "api_id" : "5f918d104dc84480a75166ba99efff21",
    "app_name" : "app_demo",
    "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
    "envname" : "RELEASE",
    "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600",
    "group_name" : "api_group_001",
    "api_type" : 1,
    "api_name" : "Api_http",
    "appid" : "356de8eb7a8742168586e5daf5339965",
    "auth_time" : "2020-08-04T04:02:22Z",
    "app_creator" : "USER",
    "id" : "dd29b33ae4394e3b924b582c6b40880b",
    "api_remark" : "Web Api",
    "auth_role" : "PROVIDER",
    "app_type" : "apig",
    "auth_tunnel" : "NORMAL"
  } ]
}
```
**状态码：400**
Bad Request
```
{
  "error_code" : "APIG.2012",
  "error_msg" : "Invalid parameter value,parameterName:app_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.3002",
  "error_msg" : "API 5f918d104dc84480a75166ba99efff21 does not exist"
}
```
**状态码：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)。
