List all CA certificates on a gateway group
GET /apisix/admin/ca_certificates
GET /apisix/admin/ca_certificatesInteractive request editor loads with JavaScript.
In: header
Query Parameters
Gateway group ID. Optional when using the gateway group admin key to authenticate.
1 <= lengthPage number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueNumber of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueOrder to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
"exptime"Value in
- "name"
- "exptime"
Condition to search resources by.
Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.
1 <= lengthThe object ID.
^[a-zA-Z0-9-_.]+$1 <= length <= 256SNI name.
Filter out results that expired before this time.
Response Body
application/json
application/json
curl -X GET "$API_BASE_URL/apisix/admin/ca_certificates?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335&search=version%253Dv2"Successfully retrieved the paginated list of CA certificates.
{
"total": 1,
"list": [
{
"name": "us-west-rsc",
"desc": "Object description.",
"cert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"labels": {
"version": "v2",
"env": "prod"
},
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"created_at": 1742288232,
"updated_at": 1742288235,
"associated_snis": [
"string"
],
"exptime": 1735680000,
"validity_start": 1714540800,
"validity_end": 1730419200
}
]
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /apisix/admin/ca_certificates
List all CA certificates on a gateway group
List CA certificates configured for mTLS client certificate verification in the gateway group. Use query filters to locate certificates by labels, expiration, or associated SNI.
Required IAM Permission: Action gateway:GetCertificate, Resource arn:api7:gateway:gatewaygroup/%s
Parameters
gateway_group_id(query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.order_by(query, string, optional):search(query, string, optional): Condition to search resources by.labels(query, string, optional): Label(s) to filter resources by. The format islabels[key]=valueand should be URL-encoded.sni_id(query, string, optional):sni_name(query, string, optional): SNI name.exptime(query, integer, optional): Filter out results that expired before this time.
Responses
200: Successfully retrieved the paginated list of CA certificates.- allOf variant 1
list(array, optional): An array of resources.total(integer, optional): Total number of objects.- allOf variant 2
list(array, optional): The array of certificates.- allOf variant 1
list[].name(string, optional): The object name.list[].desc(string, optional): The object description.list[].cert(string, optional): The certificate in PEM format.list[].labels(object, optional): Key-value pairs of labels.- allOf variant 2
list[].id(string, optional): The object ID.list[].created_at(integer, optional): The object created timestamp.list[].updated_at(integer, optional): The object updated timestamp.list[].associated_snis(array, optional): The SNI IDs associated with the certificate.list[].exptime(integer, optional): The SSL certificate expire time.list[].validity_start(integer, optional): The earliest time when the SSL certificate is used.list[].validity_end(integer, optional): The latest time when the SSL certificate is used.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/apisix/admin/ca_certificates'