调用 OpenAPI 后,所有返回结果都会携带RequestId
、Action
、Version
、Service
、Region
等字段。
接口调用成功后,会返回请求 ID 和接口返回参数。HTTP 状态码为2xx
。示例如下:
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "202211302208xxxx", "Action": "CreateWorkspace", "Version": "2021-03-03", "Service": "vmp", "Region": "cn-beijing" }, "Result": { "Id": " e28ae750-bbb8-4ff4-abf4-1e0e0f88808c" } }
接口调用出错后,会返回请求 ID 和错误信息。HTTP 状态码为4xx
或5xx
。示例如下:
{ "ResponseMetadata": { "RequestId": "202010201722300102****", "Action": "DeleteWorkspace", "Version": "2021-03-03", "Service": "vmp", "Region": "cn-beijing", "Error": { "Code": "NotFound.Workspace", "Message": "The specified Workspace demo is not found." } } }
说明
您可以根据接口错误码Code
和错误信息Message
,参考 公共错误码 和具体接口的错误码排查错误。