更新时间:2023-11-30 GMT+08:00

查看API已绑定的APP列表

功能介绍

查询API绑定的APP列表。

调用方法

请参见如何调用API

URI

GET /v2/{project_id}/apigw/instances/{instance_id}/app-auths/binded-apps

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方式请参见获取项目ID

instance_id

String

实例ID,在API网关控制台的“实例信息”中获取。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Long

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

缺省值:0

limit

Integer

每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500

最小值:1

最大值:500

缺省值:20

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参数

参数

参数类型

描述

size

Integer

本次返回的列表长度

total

Long

满足条件的记录数

auths

Array of ApiAuthInfo objects

本次返回的API列表

表5 ApiAuthInfo

参数

参数类型

描述

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,暂不支持其他类型

枚举值:

  • apig

  • roma

app_creator

String

APP的创建者,取值如下:

  • USER:租户自己创建

  • MARKET:API市场分配,暂不支持

publish_id

String

API的发布编号

group_id

String

API绑定的分组ID

auth_tunnel

String

授权通道类型

  • NORMAL:普通通道

  • GREEN:绿色通道

暂不支持,默认NORMAL

枚举值:

  • NORMAL

  • GREEN

auth_whitelist

Array of strings

绿色通道的白名单配置

auth_blacklist

Array of strings

绿色通道的黑名单配置

visit_param

String

访问参数。

roma_app_type

String

ROMA_APP的类型:

  • subscription:订阅应用

  • integration:集成应用

暂不支持

env_name

String

api授权绑定的环境名称

app_id

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",
    "env_name" : "RELEASE",
    "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600",
    "group_name" : "api_group_001",
    "api_type" : 1,
    "api_name" : "Api_http",
    "app_id" : "356de8eb7a8742168586e5daf5339965",
    "auth_time" : "2020-08-04T04:02:22Z",
    "app_creator" : "USER",
    "id" : "dd29b33ae4394e3b924b582c6b40880b",
    "api_remark" : "Web backend 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

错误码

请参见错误码