查询插件下绑定的API
功能介绍
查询指定插件下绑定的API信息。
- 用于查询指定插件下已经绑定的API列表信息
 - 支持分页返回
 - 支持API名称模糊查询
 - 绑定关系列表中返回的API在对应的环境中可能已经下线
 
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/apigw/instances/{instance_id}/plugins/{plugin_id}/attached-apis
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        是  | 
      
        String  | 
      
        项目ID,获取方式请参见获取项目ID。  | 
     
| 
        instance_id  | 
      
        是  | 
      
        String  | 
      
        实例ID,在API网关控制台的“实例信息”中获取。  | 
     
| 
        plugin_id  | 
      
        是  | 
      
        String  | 
      
        插件编号  | 
     
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        offset  | 
      
        否  | 
      
        Long  | 
      
        偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 缺省值:0  | 
     
| 
        limit  | 
      
        否  | 
      
        Integer  | 
      
        每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500 最小值:1 最大值:500 缺省值:20  | 
     
| 
        env_id  | 
      
        否  | 
      
        String  | 
      
        发布的环境编号  | 
     
| 
        api_name  | 
      
        否  | 
      
        String  | 
      
        API名称  | 
     
| 
        api_id  | 
      
        否  | 
      
        String  | 
      
        API编号  | 
     
| 
        group_id  | 
      
        否  | 
      
        String  | 
      
        分组编号  | 
     
| 
        req_method  | 
      
        否  | 
      
        String  | 
      
        请求方法  | 
     
| 
        req_uri  | 
      
        否  | 
      
        String  | 
      
        请求路径  | 
     
请求参数
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        X-Auth-Token  | 
      
        是  | 
      
        String  | 
      
        用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。  | 
     
响应参数
状态码: 200
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        size  | 
      
        Integer  | 
      
        本次返回的列表长度  | 
     
| 
        total  | 
      
        Long  | 
      
        满足条件的记录数  | 
     
| 
        apis  | 
      
        Array of PluginApiInfo objects  | 
      
        绑定插件的API列表。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        api_id  | 
      
        String  | 
      
        API编号  | 
     
| 
        api_name  | 
      
        String  | 
      
        API名称。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头,3-255个字符。 
         说明: 
         中文字符必须为UTF-8或者unicode编码。  | 
     
| 
        type  | 
      
        Integer  | 
      
        API类型 
 枚举值: 
  | 
     
| 
        req_protocol  | 
      
        String  | 
      
        API的请求协议 
 缺省值:HTTPS 枚举值: 
  | 
     
| 
        req_method  | 
      
        String  | 
      
        API的请求方式 枚举值: 
  | 
     
| 
        req_uri  | 
      
        String  | 
      
        请求地址。可以包含请求参数,用{}标识,比如/getUserInfo/{userId},支持 * / %- _ . 等特殊字符,总长度不超过512,且满足URI规范。 支持环境变量,使用环境变量时,每个变量名的长度为3 ~ 32位的字符串,字符串由英文字母、数字、中划线、下划线组成,且只能以英文开头。 
         说明: 
         需要服从URI规范。  | 
     
| 
        auth_type  | 
      
        String  | 
      
        API的认证方式 
 枚举值: 
  | 
     
| 
        match_mode  | 
      
        String  | 
      
        API的匹配方式 
 枚举值: 
  | 
     
| 
        remark  | 
      
        String  | 
      
        API描述。  | 
     
| 
        group_id  | 
      
        String  | 
      
        API所属的分组编号  | 
     
| 
        group_name  | 
      
        String  | 
      
        API所属分组的名称  | 
     
| 
        roma_app_id  | 
      
        String  | 
      
        归属集成应用编码,兼容roma实例的字段,一般为空  | 
     
| 
        env_id  | 
      
        String  | 
      
        绑定API的环境编码。  | 
     
| 
        env_name  | 
      
        String  | 
      
        绑定API的环境名称  | 
     
| 
        publish_id  | 
      
        String  | 
      
        发布编码。  | 
     
| 
        plugin_attach_id  | 
      
        String  | 
      
        插件绑定编码。  | 
     
| 
        attached_time  | 
      
        String  | 
      
        绑定时间。  | 
     
状态码: 400
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error_msg  | 
      
        String  | 
      
        错误描述  | 
     
状态码: 401
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error_msg  | 
      
        String  | 
      
        错误描述  | 
     
状态码: 403
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error_msg  | 
      
        String  | 
      
        错误描述  | 
     
状态码: 404
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error_msg  | 
      
        String  | 
      
        错误描述  | 
     
状态码: 500
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error_msg  | 
      
        String  | 
      
        错误描述  | 
     
请求示例
无
响应示例
状态码: 200
OK
{
  "total" : 1,
  "size" : 1,
  "apis" : [ {
    "api_id" : "8aa097b00e9843efabc9c593d11b769d",
    "api_name" : "测试API",
    "type" : 1,
    "req_protocol" : "HTTP",
    "req_method" : "GET",
    "req_uri" : "/test",
    "auth_type" : "IAM",
    "match_mode" : "NORMAL",
    "remark" : "API描述",
    "group_id" : "b9be707660c5406394f8973e087bae20",
    "group_name" : "DEFAULT",
    "roma_app_id" : "",
    "plugin_attach_id" : "8aa097b00e9843efacb9c593d11b769e",
    "publish_id" : "4739b3s5b729aa2237ef0d66dc635276",
    "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
    "env_name" : "RELEASE",
    "attached_time" : "2022-11-02T12:31:23.353Z"
  } ]
}
  状态码: 400
Bad Request
{
  "error_code" : "APIG.2012",
  "error_msg" : "Invalid parameter value,parameterName:instance_id. 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.3068",
  "error_msg" : "Plugin b294018ee0554156a875b3513e02e5b9 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  | 
     
错误码
请参见错误码。