
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2026-03-18 14:12:49
This page provides the essential information required to construct valid requests to the Kingsoft Cloud Monitor OpenAPI, including communication protocols, request structures, common parameters, and response formats.
Kingsoft Cloud Monitor APIs support both HTTP and HTTPS.
Security Recommendation: We strongly recommend using HTTPS for all production requests to ensure data encryption and prevent man-in-the-middle attacks.
The APIs support the following HTTP methods:
Method | Recommendation | Usage Scenario |
|---|---|---|
POST | ⭐ Recommended | Preferred for most operations. Supports larger payloads and keeps parameters in the request body (cleaner URLs). |
GET | Supported | Suitable for simple data retrieval queries. All parameters must be URL-encoded and appended to the query string. |
A valid API request consists of the following core components:
Endpoint: The service URL (e.g., monitor.cn-beijing-1.api.ksyun.com).
Method: The HTTP verb (GET or POST).
Parameters:
Common Parameters: Required for every request (e.g., Action, Version, Signature).
Action Parameters: Specific to the API operation being called (e.g., Namespace, MetricName).
Encoding: All requests and responses use the UTF-8 character set.
Signature: A cryptographic signature to authenticate the request.
Request Type | Parameter Location | Encoding Requirement |
|---|---|---|
GET | Query String | All parameters (including |
POST | Body / Header | • Parameters are typically in the request body.• The |
Every API request must include the following common parameters. Missing any of these will result in an authentication or validation error.
Parameter | Type | Required | Description |
|---|---|---|---|
Action | String | ✅ | The name of the API operation (e.g., |
Version | String | ✅ | The API version date. Different modules use different versions:• Custom Monitoring: |
Region | String | ✅ | The region ID where the resource resides (e.g., |
Timestamp | String | ✅ | The time of the request in ISO 8601 format (e.g., |
Signature | String | ✅ | The calculated signature string verifying the request's authenticity. See Authentication Guide. |
SignatureMethod | String | ✅ | The signature algorithm used, typically |
Kingsoft Cloud Monitor APIs return data in XML by default.
Default: application/xml
JSON: To receive JSON, set the HTTP Header: Accept: application/json.
200 OK: The request was successful.
4xx Client Errors: The request contains an error (e.g., invalid parameters, auth failure).
5xx Server Errors: An internal server error occurred.
<GetMetricStatisticsResponse>
<ResponseMetadata>
<RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
</ResponseMetadata>
<!-- Specific Data Payload -->
<Data>
<Datapoint>
<Average>45.2</Average>
<Timestamp>2026-03-18T10:00:00Z</Timestamp>
</Datapoint>
</Data>
</GetMetricStatisticsResponse>When an error occurs, the API returns an <ErrorResponse> block along with the corresponding HTTP status code (4xx or 5xx).
<ErrorResponse>
<RequestId>a9f1362f-529f-4b72-a22c-426132db9094</RequestId>
<Error>
<Type>Sender</Type>
<Code>MissingParameter</Code>
<Message>An value must be supplied for the input parameter Namespace.</Message>
</Error>
</ErrorResponse>Troubleshooting Tip: If you encounter an unexpected error, please contact Kingsoft Cloud Support and provide the
RequestId. This allows our team to trace the specific request logs and resolve the issue quickly.
The following table lists common error codes returned by the Cloud Monitor API.
Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
MissingAuthenticationToken | 403 | Request lacks required authentication headers or tokens. | Ensure |
SignatureDoesNotMatch | 403 | The provided signature does not match the server's calculation. | Verify your Secret Key, signing algorithm, and time synchronization. |
InvalidClientTokenId | 403 | The AccessKey ID provided is invalid or disabled. | Check your AccessKey ID and account status. |
AccessDenied | 403 | User is not authorized to perform the requested action. | Check IAM policies and user permissions. |
IncompleteSignature | 400 | The signature structure is malformed or missing fields. | Ensure all required signature components (Credential, Date, etc.) are present. |
InvalidParameterValue | 400 | A parameter value is out of range or invalid. | Check the API documentation for valid parameter ranges. |
MissingParameter | 400 | A required parameter is missing. | Ensure all mandatory parameters (Action, Version, etc.) are included. |
LimitExceeded | 409 | API rate limit exceeded. | Reduce request frequency or implement exponential backoff. |
ServiceUnavailable | 500 | Temporary service outage or internal error. | Retry the request after a short delay. |
DryRunOperation | 412 | Request validated but not executed due to | Remove the |
Pure Mode