API网关 APIG-调试API:响应示例

时间:2024-06-27 11:06:19

响应示例

状态码: 200

OK

{
  "request" : "GET /test/mock HTTP/1.1\nHost: c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com\nUser-Agent: APIGatewayDebugClient/1.0\nX-Apig-Mode: debug\n\n",
  "response" : "HTTP/1.1 200 OK\nTransfer-Encoding: chunked\nConnection: keep-alive\nContent-Type: application/json\nDate: Mon, 03 Aug 2020 02:51:22 GMT\nServer: api-gateway\nX-Apig-Latency: 0\nX-Apig-Ratelimit-Api: remain:99,limit:100,time:1 minute\nX-Apig-Ratelimit-Api-Allenv: remain:14999,limit:15000,time:1 second\nX-Request-Id: d4ec6e33148bdeffe8f55b43472d1251\n\nmock success",
  "latency" : 5,
  "log" : ""
}

状态码: 400

Bad Request

{
  "error_code" : "APIG.2011",
  "error_msg" : "Invalid parameter value,parameterName:mode. 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 3a955b791bd24b1c9cd94c745f8d1aad does not exist"
}

状态码: 500

Internal Server Error

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