API网关 APIG-导入API:响应示例

时间:2024-01-19 18:17:12

响应示例

状态码: 200

OK

{
  "group_id" : "d9ce8c9eede54b3f841ec324fe0bfdc2",
  "failure" : [ {
    "path" : "/test/demo",
    "error_msg" : "The API already exists, An API with the same combination of the method, path, and x-apigateway-match-mode fields already exists. API name: API_demo",
    "method" : "GET",
    "error_code" : "APIG.3301"
  } ],
  "success" : [ {
    "path" : "/test",
    "method" : "GET",
    "action" : "create",
    "id" : "8ae6bcafab6f49d78242bff26ad8a4f0"
  } ],
  "swagger" : {
    "id" : "e2ea8a7c1cfc49b3830437cb79d7fd59",
    "result" : "Success"
  }
}

状态码: 400

Bad Request

{
  "error_code" : "APIG.3201",
  "error_msg" : "The API group name already exists"
}

状态码: 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.3001",
  "error_msg" : "API group not found"
}

状态码: 500

Internal Server Error

{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}
support.huaweicloud.com/api-apig/ImportApiDefinitionsV2.html