PolarDB-X API requests require common parameters for authentication. Responses follow a consistent structure across all operations.
Common request parameters
Include the following parameters in every API request.
| Parameter | Type | Required | Description |
|---|---|---|---|
Format | String | No | The response format. Valid values: JSON, XML. Default: JSON. |
Version | String | Yes | The API version in YYYY-MM-DD format. Set to 2020-02-02. |
AccessKeyId | String | Yes | The AccessKey ID used to authenticate with PolarDB-X. |
Signature | String | Yes | The signature string for the current request. |
SignatureMethod | String | Yes | The signature encryption algorithm. Set to HMAC-SHA1. |
Timestamp | String | Yes | The request timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ssZ (UTC). For example, 2013-01-10T12:00:00Z represents 20:00:00 UTC+8 on January 10, 2013. |
SignatureVersion | String | Yes | The signature algorithm version. Set to 1.0. |
SignatureNonce | String | Yes | A unique random number to prevent replay attacks. Use a different value for each request. |
ResourceOwnerAccount | String | No | The name of the account that owns the resource. Use this parameter to call API operations using another account. |
Common response parameters
API responses use the HTTP response format and can be returned as JSON or XML. Set the format using the Format request parameter. The default response format is XML.
Every response includes a unique RequestId, regardless of whether the call succeeds:
A
2xxstatus code indicates success.A
4xxor5xxstatus code indicates failure.
Sample XML response:
<?xml version="1.0" encoding="utf-8"?>
<!--Result Root Node-->
<InterfaceNameResponse>
<!--Return Request Tag-->
<RequestId>4C467B38-3910-447D-87BC-AC0491******</RequestId>
<!--Return Result Data-->
</InterfaceNameResponse>Sample JSON response:
{
"RequestId": "4C467B38-3910-447D-87BC-AC0491******"
}