All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Response

Last updated:2021-10-26 22:55:48

API responses use the HTTP response format where a 200 status code indicates a successful call and a 4xx or 5xx status code indicates a failed call.

The responses for Kingsoft Cloud EBS API operations can be returned in either the XML or JSON format. The default response format is XML. You can change the response format to JSON by setting the HTTP header Accept=application/json.

Sample success responses

XML format


<API operation name+Response>
    <ResponseMetadata>
         <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
    </ResponseMetadata>    

</API operation name+Response>

JSON format

{
    "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
    /*Return result data*/
}

Sample error responses

If an API operation fails to be called, no result data is returned. Instead, a 4xx or 5xx HTTP status code is returned. The returned HTTP response body contains the specific error code and error message, and the request ID. If you cannot locate the error cause, contact Kingsoft Cloud customer service and provide the request ID for help.

XML format


<ErrorResponse>
    <RequestId>e1eac1b3-1f35-44ba-abd4-7c4b7a9859f3</RequestId>

    <Error>

        <Type>Sender</Type>

        <code>InvalidParameterValue</code>

        <Message>An invalid or out-of-range value was supplied for the input parameter PathPrefix.</Message>
    </Error>
</ErrorResponse>

JSON format

{    
    "RequestId": "68093a99-2f63-4f39-8f70-3047ab8ecb5b",
    "Error": {
        "Type": "Sender",
        "Code": "InvalidParameterValue",
        "Message": "An invalid or out-of-range value was supplied for the input parameter PathPrefix."    
    }
}

Common errors

Error code Error message HTTP status code Description
MissingAuthenticationToken Request is missing 'Host' header. 403 The error message returned because Host is not specified in the request header.
MissingAuthenticationToken Request is missing Authentication Token. 403 The error message returned because the authentication token is not specified in the request header.
MissingAuthenticationToken %s not in Http Header. 403 The error message returned because the %s parameter is not specified in the HTTP header.
SignatureDoesNotMatch 'Host' must be a 'SignedHeader' in the Authorization. 403 The error message returned because Host is required in SignedHeaders of the request.
SignatureDoesNotMatch Credential should be scoped with a valid terminator: 'aws4_request', not: %s. 403 The error message returned because the credential scope in the Authorization header must end with aws4_request.
SignatureDoesNotMatch Credential should be scoped to a valid region, not:%s. 403 The error message returned because the region name in the credential scope in the Authorization header is invalid.
SignatureDoesNotMatch Credential should be scoped to correct service: %s. 403 The error message returned because the service name in the credential scope in the Authorization header is invalid.
SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. 403 The error message returned because the signature in the request does not match the calculated signature.
SignatureDoesNotMatch Signature expired:%s. 403 The error message returned because the signature has expired.
SignatureDoesNotMatch Date in Credential scope does not match YYYYMMDD from ISO-8601 version of date from HTTP. 403 The error message returned because the date in the credential scope in the Authorization header must be in the ISO 8601 basic format: YYYYMMDD.
InvalidClientTokenId The security token included in the request is invalid. 403 The error message returned because the AccessKeyID in the request is invalid.
AccessDenied User: %s is not authorized to perform: %s. 403 The error message returned because user %s is not authorized to access %s.
IncompleteSignature Date must be in ISO-8601 'basic format'. Got '%s'. See http://en.wikipedia.org/wiki/ISO_8601. 400 The error message returned because the date must be in the ISO 8601 basic format. For more information about the format, see http://en.wikipedia.org/wiki/ISO_8601.
IncompleteSignature KSC query-string parameters must include %s. Re-examine the query-string parameters. 400 The error message returned because X-Amz-Algorithm, X-Amz-Credential, X-Amz-SignedHeaders, and X-Amz-Date are not specified in the request.
IncompleteSignature Unsupported ksc 'algorithm': %s. 400 The error message returned because only the AWS4-HMAC-SHA256 algorithm is supported.
IncompleteSignature Authorization header requires 'Credential' parameter. Authorization=%s. 400 The error message returned because Credential is not specified in the Authorization header.
IncompleteSignature Credential must have exactly 5 slash-delimited elements, e.g. accesskeyid/date/region/service/aws4_request, got: %s. 400 The error message returned because Credential in the Authorization header must contain at least five fields delimited by forward slashes (/)-, for example, keyid/date/region/service/aws4_request.
IncompleteSignature Authorization header format error. 400 The error message returned because the Authorization header is in an invalid format.
IncompleteSignature Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header, Authorization=%s 400 The error message returned because the X-Amz-Date or Date header is not specified in the request.
IncompleteSignature Authorization header requires 'Signature' parameter. Authorization=%s 400 The error message returned because the signature is not specified in the Authorization header.
IncompleteSignature Authorization header requires 'SignedHeaders' parameter. Authorization=%s 400 The error message returned because signed headers are not specified in the Authorization header.
ServiceUnavailable Exception %s 500 The error message returned because the service is temporarily unavailable.
ServiceUnavailable Auth Service is unavailable because of an unknown error, exception or failure 500 The error message returned because the authentication or authorization service is temporarily unavailable.
ServiceUnavailable Request was rejected because it referenced an 'InnerApi' that does not have an internal service 404 The error message returned because the referenced inner API does not have an internal service and the request is denied.
ServiceUnavailable OpenAPI or Service is unavailable because of an unknown error, exception or failure. 500 The error message returned because the API or service is temporarily unavailable.
DryRunOperation Request would have succeeded, but DryRun flag is set 412 The error message returned because the request fails due to the DryRun tag.
NoSuchEntity Request was rejected because it referenced an 'InnerApi' that does not exist. 404 The error message returned because the referenced inner API does not exist and the request is denied.
LimitExceeded Request was rejected because the request speed of this openAPI is beyond the current flow control limit. 409 The error message returned because the traffic of the API has reached the upper limit and the request is denied.
InvalidParameterValue An invalid or out-of-range value was supplied for the input parameter %s. 400 The error message returned because the value of the %s input parameter is invalid or out of range.
InvalidMethod The method %s for is not valid for this web service. 400 The error message returned because the %s method is not applicable to the current web service.
MissingParameter An value must be supplied for the input parameter %s. 400 The error message returned because the %s input parameter is not specified.
InvalidQueryParameter The query parameter %s is malformed or does not adhere to KSC standards. 400 The error message returned because the %s query parameter is in an invalid format, does not exist, or does not comply with Kingsoft Cloud standards.
ServiceTimeout Internal Service is unavailable because of time out. 500 The error message returned because the internal service is temporarily unavailable due to timeout.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback