Help Center/ GaussDB(for MySQL)/ API Reference/ APIs (Recommended)/ Parameter Template Management/ Querying Application Records of a Parameter Template
Updated on 2024-09-11 GMT+08:00

Querying Application Records of a Parameter Template

Function

This API is used to query application records of a parameter template. Before calling this API:

URI

GET /v3/{project_id}/configurations/{config_id}/apply-history

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

config_id

Yes

String

Parameter template ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records to be queried. The default value is 10. The value must be a positive integer. The minimum value is 1 and the maximum value is 100.

offset

No

Integer

Index offset. If offset is set to N, the query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value must be a number but cannot be a negative number.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

To obtain the value, call the API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Content-Type

Yes

String

Content type.

Value: application/json

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

String

Number of application records.

histories

Array of TemplateApplyHistory objects

Application record information.

Table 5 TemplateApplyHistory

Parameter

Type

Description

target_id

String

ID of the instance that the template is applied to.

target_name

String

Name of the instance that the template is applied to.

apply_result

String

Application result.

applied_at

Number

Time when the template was applied.

error_code

String

Error code.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying application records of a parameter template

GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/configurations/b366363c95b04b0eac39e73ea2672ffepr07/apply-history

Example Response

Status code: 200

Success.

{
  "total_count" : 1,
  "histories" : [ {
    "target_id" : "06789bdfbe414d78b9cef1b79d7d9680in07",
    "target_name" : "gauss-11",
    "apply_result" : "SUCCESS",
    "applied_at" : 1712246191000,
    "error_code" : ""
  } ]
}

Status Code

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Code

For details, see Error Codes.