API access
Requests and authentication
All OpenAPI V1 endpoints use POST and start with /api/open/v1. Send a UTF-8 JSON object up to 2 MiB. Send {} when there are no business parameters.
An AK/SK pair belongs to a subaccount. Requests are authorized using that subaccount's feature and resource permissions. Accounts with credential management permission can get or reset credentials through the AK/SK action in the Console's subaccount list.
| Request header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json. |
| AccessKeyId | Yes | The subaccount's AK. |
| SignatureMethod | Yes | Set to HmacSHA256. |
| Timestamp | Yes | UTC time in ISO 8601 format, such as 2026-11-30T08:00:00Z. It must be within 5 minutes of the server time. |
| SignatureNonce | Yes | Use a new random value for each request, up to 128 characters. A UUID is suitable. |
| Signature | Yes | Signature encoded in standard Base64. |
| Idempotency-Key | Conditionally required | Required for DataSource and subaccount management writes. Use 1 to 128 visible ASCII characters. |
Calculate the signature
Join the following items in order using LF (\n). End the string at the last character of the request body digest.
- HTTP method. Use POST.
- Full endpoint path, starting with /api/open/v1/.
- Raw query string after the question mark. Use an empty string if omitted.
- AccessKeyId.
- SignatureMethod.
- Timestamp.
- SignatureNonce.
- Idempotency-Key. Use an empty string if omitted.
- SHA-256 digest of the exact request body bytes sent, encoded in lowercase hexadecimal.
Use the UTF-8 bytes of the SK as the HMAC-SHA256 key, sign the string, and encode the result in standard Base64.
Example API call
Set the CLOUDDM_BASE_URL, CLOUDDM_ACCESS_KEY_ID, and CLOUDDM_SECRET_KEY environment variables, then run the Python example below. DataSource type list
import base64
import hashlib
import hmac
import os
import uuid
from datetime import datetime, timezone
from urllib.parse import urlsplit
from urllib.request import Request, urlopen
base_url = os.environ["CLOUDDM_BASE_URL"].rstrip("/")
access_key_id = os.environ["CLOUDDM_ACCESS_KEY_ID"]
secret_key = os.environ["CLOUDDM_SECRET_KEY"]
path = "/api/open/v1/datasource/listDataSourceTypes"
url = base_url + path
body = b"{}"
method = "POST"
signature_method = "HmacSHA256"
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
nonce = str(uuid.uuid4())
idempotency_key = ""
string_to_sign = "\n".join([
method,
path,
urlsplit(url).query,
access_key_id,
signature_method,
timestamp,
nonce,
idempotency_key,
hashlib.sha256(body).hexdigest(),
])
signature = base64.b64encode(
hmac.digest(secret_key.encode("utf-8"), string_to_sign.encode("utf-8"), "sha256")
).decode("ascii")
headers = {
"Content-Type": "application/json",
"AccessKeyId": access_key_id,
"SignatureMethod": signature_method,
"Timestamp": timestamp,
"SignatureNonce": nonce,
"Signature": signature,
}
if idempotency_key:
headers["Idempotency-Key"] = idempotency_key
request = Request(url, data=body, headers=headers, method=method)
with urlopen(request, timeout=30) as response:
print(response.read().decode("utf-8"))
Pagination
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageNumber | Integer | Yes | Page number, starting at 1. |
| pageSize | Integer | Yes | Number of records per page, from 1 to 100. |
data.items contains the current page's records. data.total is the number of records that match the permissions and filters. A page beyond the last page returns an empty items array.
Idempotent retries
Generate an Idempotency-Key for each management write. On retry, reuse the original key, query string, and request body, and generate a new Timestamp, SignatureNonce, and Signature.
Successful responses are retained for 24 hours. When the same subaccount retries the same endpoint, its permissions are checked again. If the check passes, the first successful response is returned. Reusing the key with a different query string or request body returns 409 / STATE_CONFLICT.
Responses
| Field | Type | Description |
|---|---|---|
| requestId | String | Request identifier used to look up call records. |
| code | String | Application result code. |
| msg | String | Result message. |
| data | Object, array, or null | Data returned by the endpoint. |
| HTTP status | Application code | Description |
|---|---|---|
| 200 | OK | Request processed successfully. For connection tests, data.success indicates whether the connection succeeded. |
| 201 | OK | The DataSource or subaccount was created successfully. |
| 400 | INVALID_ARGUMENT | Invalid request parameters or format. |
| 401 | UNAUTHENTICATED | Invalid credentials or signature, disabled account, timestamp outside the allowed window, or reused nonce. |
| 403 | FORBIDDEN | Insufficient feature or resource permissions. |
| 404 | NOT_FOUND | The endpoint or resource is missing, or the OpenAPI plugin is unloaded. |
| 405 | INVALID_ARGUMENT | The request method must be POST. |
| 409 | STATE_CONFLICT | A resource state conflict occurred, or the same idempotency key was used for different request content. |
| 422 | SQL_RULE_BLOCKED | SQL was blocked by a rule. |
| 422 | SQL_EXECUTION_FAILED | SQL execution failed. |
| 429 | RATE_LIMITED | The SQL execution concurrency limit was reached. |
| 500 | INTERNAL_ERROR | The service failed to process the request. |
| 504 | EXECUTION_TIMEOUT | SQL execution timed out. |