| 字段 | 类型 | 是否必返回 | 说明 |
|---|---|---|---|
| ResponseMetadata | json | 否 | 网关返回值,若此字段返回且值不为None,则无需关注其他字段 |
| request_id | String | 否,若ResponseMetadata未返回或值为None时,必返回 | 代表此次请求的唯一ID |
| time_elapsed | Int | 否,若ResponseMetadata未返回或值为None时,必返回 | 整个请求所花费的时间,单位为毫秒 |
| code | Int | 否,若ResponseMetadata未返回或值为None时,必返回 | 表示本次验证的结果状态码。见底下 通用code对应表 和 各API文档 code对应表 |
| message | String | 否,若ResponseMetadata未返回或值为None时,必返回 | 当请求失败时返回此字符串,否则此字段不存在 |
| data | json | 否,若ResponseMetadata未返回或值为None时,必返回 | json字符串,里面包含的是各接口的业务数据 |
| 字段 | 类型 | 是否必返回 | 说明 |
|---|---|---|---|
| RequestId | string | 是 | 网关请求的唯一ID |
| Action | string | 否 | 接口名 |
| Version | string | 否 | 版本号 |
| Service | string | 否 | 服务名 |
| Region | string | 否 | 地区 |
| Error | ErrorInfo | 否 | 错误信息 |
| 字段 | 类型 | 是否必返回 | 说明 |
|---|---|---|---|
| Code | string | 是 | 网关错误码,详见下方网关错误码与错误信息 |
| Message | string | 是 | 网关错误信息,详见下方网关错误码与错误信息 |
Code | CodeN | Message | 备注 | http-code |
UndefinedError | 100001 | Undefined Internal Error. Pls Contact With Admin. | 一般不出现这个问题,这是系统开发兜底的错误提示 | 500 |
MissingParameter | 100002 | The request is missing %s parameter. | 关键参数缺失,例如Action, Version参数 | 400 |
MissingAuthenticationToken | 100003 | Request is missing Authentication Token. | 缺少身份认证的必要信息,例如Auth信息 | 401 |
MissingRequestInfo | 100004 | The request is missing %s information. | 缺少请求必要信息,例如:Accesskey,service,region等 | 400 |
MissingSignature | 100005 | The request is missing signature. | 缺少签名结果 | 401 |
InvalidTimestamp | 100006 | The Signature of the request is expired. | 请求过期或请求的签名时间来自未来 | 403 |
ServiceNotFound | 100007 | This service[%s] not found. | 请求的服务不存在 | 404 |
InvalidActionOrVersion | 100008 | Could not find operation %s for version %s. | 请求接口不存在 | 404 |
InvalidClientTokenId | 100009 | The security token[%s] included in the request is invalid. | 请求的AK不合法 | 401 |
SignatureDoesNotMatch | 100010 | The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details. | 签名结果不正确 | 401 |
ServiceShouldCallSelfApi | 100011 | The service(%s) should call self-api. | 使用service aksk访问请求,仅能访问自己的接口和公共服务的接口。公共服务例如:iam | 403 |
LackPolicy | 100012 | Request was rejected because of lack of policy. | 子用户请求缺少权限(默认是deny的) | 403 |
AccessDenied | 100013 | User is not authorized to perform: %s on resource: %s. | 子用户拥有的权限不支持当前操作 | 403 |
InternalError | 100014 | Service has some internal Error. Pls Contact With Admin. | TOP自身内部错误,例如DB error | 500 |
FailToConnect | 100015 | Top Fail to Connect to Internal Service. | 业务服务连接不上,这里的业务一般指具体的imagex、vod | 502 |
InternalServiceTimeout | 100016 | Internal Service is timeout. Pls Contact With Admin. | 内部服务执行超时,请查看服务在TOP上配置的超时时间 | 504 |
InnerApiNeedAccountInfo | 100017 | The inner request should have account info. | Service aksk请求内部服务时缺少了账号信息 | 400 |
FlowLimitExceeded | 100018 | Request was rejected because the request speed of this openAPI is beyond the current flow control limit. | 请求过于频繁,超出了基本限速 | 429 |
ServiceUnavailableTemp | 100019 | Service is busy, please try again later. | 处于熔断状态的服务暂时不可访问,稍后重试 | 503 |
MethodNotAllowed | 100020 | HTTP Method Not Allowed. | Http method不合法 | 405 |
LackProjectPolicy | 100021 | Request was rejected because of lack of project policy. | 请求需要验证Project的权限,当前Project权限验证不合法 | 403 |
InternalServiceError | 100023 | Service has some internal Error. Pls Contact With Admin. | 业务服务存在故障,这里的业务一般指具体的imagex、vod。故障不来自TOP | 502 |
| http_code | code | 状态类型 | 说明 |
|---|---|---|---|
| 200 | 10000 | ECSuccess | 请求成功 |
| 400 | 50200 | ECReqInvalidArgs | 参数错误 |
| 400 | 50201 | ECReqMissingArgs | 缺少参数 |
| 400 | 50204 | ECParseArgs | 参数类型错误/参数缺失 |
| 400 | 50205 | ECImageSizeLimited | 图像尺寸超过限制 |
| 400 | 50206 | ECImageEmpty | 请求参数中没有获取到图像 |
| 400 | 50207 | ECImageDecodeError | 图像解码错误: 没有获取到图像或者通过image_base64参数传递图像是base64解码错误 |
| 401 | 50400 | ECAuth | 权限校验失败 |
| 404 | 50402 | ECReqMethod | 访问的接口不存在 |
| 429 | 50429 | ECReqLimit | 超过调用QPS限制 |
| 500 | 50500 | ECInternal | 服务器内部错误 |
| 500 | 50501 | ECRPCInternal | 服务器内部RPC错误 |