API网关 APIG-API绑定插件:响应示例

时间:2024-11-11 18:22:29

响应示例

状态码: 201

OK

{
  "attached_plugins" : [ {
    "plugin_attach_id" : "8aa097b00e9843efacb9c593d11b769e",
    "plugin_id" : "5b729aa252764739b3s237ef0d66dc63",
    "plugin_name" : "跨域插件",
    "plugin_type" : "cors",
    "plugin_scope" : "global",
    "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
    "env_name" : "RELEASE",
    "api_id" : "8aa097b00e9843efabc9c593d11b769d",
    "api_name" : "api_name",
    "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"
}
support.huaweicloud.com/api-apig/AttachPluginToApi.html