Querying the Certificate List
Function
This API is used to obtain the existing certificates in a Logstash cluster.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/clusters/{cluster_id}/certs
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints N/A Range Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits. Default Value N/A |
| cluster_id | Yes | String | Definition ID of the cluster to be queried. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints N/A Range The value is a UUID containing 36 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | String | Definition Start position for pagination query. Constraints N/A Range The value is an integer greater than or equal to 1. Default Value 1 |
| limit | No | String | Definition Total records on each page during pagination query. Constraints N/A Range 1-1000 Default Value 10 |
| certsType | No | String | Definition Certificate type. If not specified, the custom certificate list is queried. Constraints N/A Range defaultCerts: Default certificate type. Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| certsRecords | Array of CertsRecordsDatastore objects | Definition Certificate record information, including the certificate name, certificate path, and more. |
| totalSize | Integer | Definition Number of certificate records. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: Certificate record ID. Value range: N/A |
| status | String | Definition: Certificate status. Value range: |
| fileLocation | String | Definition: Location of the certificate record file. Value range: N/A |
| fileName | String | Definition: Name of the certificate record file. Value range: N/A |
| updateAt | String | Definition Certificate record update time. The format is yyyy-MM-dd'T'HH:mm:ss, for example, 2023-01-01T12:00:00. Range N/A |
Example Requests
This API is used to query the certificate list.
GET https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/certs Example Responses
Status code: 200
Request succeeded.
{
"certsRecords" : [ {
"id" : "2630b1ab-47f8-445c-a4e0-5de74683d767",
"status" : "available",
"fileLocation" : "/rds/datastore/logstash/v7.10.0/package/logstash-7.10.0/extend/custom_certs/",
"fileName" : "xxxx.cer",
"updateAt" : "2023-06-14T06:54:36"
} ],
"totalSize" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. Modify the request instead of retrying. |
| 409 | The request cannot be processed due to a conflict. This status code indicates that the resource that the client attempts to create already exits, or the requested update failed due to a conflict. |
| 412 | The server does not meet one of the requirements that the requester puts on the request. |
Error Codes
See Error Codes.