Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
20 KiB
Querying Application Records of a Parameter Template
Function
This API is used to query application records of a parameter template.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
- Default parameter templates cannot be deleted.
- The following DB engines are supported: MySQL, Microsoft SQL Server, and PostgreSQL.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/configurations/{config_id}/apply-histories?offset={offset}&limit={limit}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
config_id
Yes
String
Specifies the parameter template ID.
offset
No
Integer
Index offset. The query starts from the next piece of data indexed by this parameter.
Range:
The value must be a non-negative number.
Default Value:
The default value is 0, indicating that the query starts from the first data record.
limit
No
Integer
Number of records to be queried.
Range:
1–100
Default Value:
If this parameter is not specified, the default value 10 is used.
Request
- Request parameters
Table 2 Request header parameters Parameter
Mandatory
Type
Description
X-Auth-Token
Yes
String
Specifies the user token.
The user token is a response to the API used to obtain a user token.
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
total_count
Integer
Total number of parameter template application records.
histories
Array of objects
Event details list.
For details, see Table 4.
Table 4 Data structure description of field histories Parameter
Type
Description
instance_id
String
ID of the instance to which the parameter template is applied.
instance_name
String
Name of the instance to which the parameter template is applied.
apply_result
String
Result of applying the parameter template.
- SUCCESS
- FAILED
apply_time
String
Time when the parameter template is applied.
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.
error_code
String
Error code displayed when you submit the request to apply the parameter template.
- Example normal response
{ "histories" : [ { "instance_id" : "08dbfde762034d5a9ace8f73c156e2e5in01", "instance_name" : "TestInstance", "apply_result" : "SUCCESS", "apply_time" : "2025-07-07T07:34:08+0000", "error_code" : "" } ], "total_count" : 1 } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.