最近更新时间:2022-01-26 16:51:31
金山云Web应用防火墙的调用返回的数据格式支持xml
和json
两种,默认返回json
格式,可通过设置HTTP Header Accept=application/json
来改变返回数据格式。每次接口调用,无论成功与否,系统都会返回一个唯一识别码RequestId
。
2xx
HTTP状态码表示调用成功。4xx
或5xx
HTTP状态码表示调用失败。json
格式示例
{
"RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
/*返回结果数据*/
}
调用接口失败,不会返回结果数据;返回的HTTP消息体中包含具体的错误代码(code)
及错误信息(message)
;与调用成功一样还包含请求ID(RequestId)
,在调用方找不到错误原因时,可以联系金山云客服,并提供RequestId
,以便我们尽快帮您解决问题。
XML
格式示例
<?xml version="1.0" encoding="UTF-8"?>
<response>
<Error>
<Code>PermissionDenied</Code>
<InnerCode>permission_denied</InnerCode>
<Message>权限不足</Message>
</Error>
<RequestId>fd229f7c-e65f-1402-1d85-8cdff25c8b59</RequestId>
</response>
错误代码(Code) | 错误消息(Message) | HTTP 状态码 | 中文描述(语义) |
---|---|---|---|
MissingAuthenticationToken | Request is missing ‘Host’ header. | 403 | 请求header中缺少Host |
MissingAuthenticationToken | Request is missing Authentication Token. | 403 | 请求header中缺少认证token |
MissingAuthenticationToken | %s not in Http Header. | 403 | %s不在Http header中 |
SignatureDoesNotMatch | Host’ must be a ‘SignedHeader’ in the Authorization. | 403 | 请求的SignedHeader中必须包含Host |
SignatureDoesNotMatch | Credential should be scoped with a valid terminator: ‘aws4_request’, not: %s. | 403 | 请求Authorization header中的“Credential”末尾必须是“aws4_request” |
SignatureDoesNotMatch | Credential should be scoped to a valid region, not:%s. | 403 | 请求Authorization header中的“Credential”中的Region信息无效 |
SignatureDoesNotMatch | Credential should be scoped to correct service: %s. | 403 | 请求Authorization header中的“Credential”中的Service信息无效 |
SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided. | 403 | 请求中提供的签名与实际计算结果不匹配 |
SignatureDoesNotMatch | Signature expired:%s. | 403 | 签名已过期 |
SignatureDoesNotMatch | Date in Credential scope does not match YYYYMMDD from ISO-8601 version of date from HTTP. | 403 | 请求Authorization header中的“Credential”中的Date应该是ISO8601基本格式,形如”YYYYMMDD“ |
InvalidClientTokenId | The security token included in the request is invalid. | 403 | 请求中提供的AccessKeyId无效 |
AccessDenied | User: %s is not authorized to perform: %s. | 403 | 用户%s无权限操作该资源:%s |
IncompleteSignature | Date must be in ISO-8601 ‘basic format’. Got ‘%s’. See http://en.wikipedia.org/wiki/ISO_8601. | 400 | Date必须符合ISO_8601基本格式,参考:http://en.wikipedia.org/wiki/ISO_8601 |
IncompleteSignature | KSC query-string parameters must include %s. Re-examine the query-string parameters. | 400 | 查询条件中缺少签署信息,查询条件中必须包含”X-Amz-Algorithm“、”X-Amz-Credential“、”X-Amz-SignedHeaders“、”X-Amz-Date“信息 |
IncompleteSignature | Unsupported ksc ‘algorithm’: %s. | 400 | 只支持如下签名算法:AWS4-HMAC-SHA256 |
IncompleteSignature | Authorization header requires ‘Credential’ parameter. Authorization=%s. | 400 | 请求Authorization header中需要包含“Credential”参数 |
IncompleteSignature | Credential must have exactly 5 slash-delimited elements, e.g. accesskeyid/date/region/service/aws4_request, got: %s. | 400 | 请求Authorization header中中“Credential”至少包含5项以斜杠分隔的元素,如:keyid/date/region/service/aws4_request |
IncompleteSignature | Authorization header format error. | 400 | 请求Authorization header的格式错误 |
IncompleteSignature | Authorization header requires existence of either a ‘X-Amz-Date’ or a ‘Date’ header, Authorization=%s | 400 | 请求中缺少“X-Amz-Date”或者“Date” header信息 |
IncompleteSignature | Authorization header requires ‘Signature’ parameter. Authorization=%s | 400 | 请求Authorization header中缺少“Signature”信息 |
IncompleteSignature | Authorization header requires ‘SignedHeaders’ parameter. Authorization=%s | 400 | 请求Authorization header中缺少“SignedHeaders”信息 |
ServiceUnavailable | Exception %s | 500 | 服务暂不可用 |
ServiceUnavailable | Auth Service is unavailable because of an unknown error, exception or failure | 500 | 验签或授权服务暂不可用 |
ServiceUnavailable | Request was rejected because it referenced an ‘InnerApi’ that does not have an internal service | 404 | 请求被拒绝,因其引用的InnerAPI无内部服务。 |
ServiceUnavailable | OpenAPI or Service is unavailable because of an unknown error, exception or failure. | 500 | openAPI或服务暂不可用。 |
DryRunOperation | Request would have succeeded, but DryRun flag is set | 412 | 请求本可成功,但由于设置DryRun标记未成功 |
NoSuchEntity | Request was rejected because it referenced an ‘InnerApi’ that does not exist. | 404 | 请求被拒绝,因其引用的InnerAPI不存在 |
LimitExceeded | Request was rejected because the request speed of this openAPI is beyond the current flow control limit. | 409 | 请求被拒绝,因该openAPI接口访问速度已达到流控上限 |
InvalidParameterValue | An invalid or out-of-range value was supplied for the input parameter %s. | 400 | 输入参数%s的值无效、不合法或者超出范围 |
InvalidMethod | The method %s for is not valid for this web service. | 400 | Method %s对当前web服务无效 |
MissingParameter | An value must be supplied for the input parameter %s. | 400 | 输入参数 %s的值不能为空 |
InvalidQueryParameter | The query parameter %s is malformed or does not adhere to KSC standards. | 400 | 查询参数 %s格式不对、不存在或者不符合金山云标准 |
ServiceTimeout | Internal Service is unavailable because of time out. | 500 | 内部服务由于超时暂不可用 |
纯净模式