List all certificates on a gateway group
GET /apisix/admin/certificates
GET /apisix/admin/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/certificates?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335&search=version%253Dv2"Successfully retrieved the paginated list of certificates.
{
"total": 1,
"list": [
{
"name": "us-west-rsc",
"desc": "Object description.",
"cert": "$secret://aws/john/apisix-secrets/john-key-auth",
"labels": {
"version": "v2",
"env": "prod"
},
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"created_at": 1742288232,
"updated_at": 1742288235,
"common_name": "example.com",
"subject_alt_names": [
"www.example.com"
],
"associated_snis": [
"1cf56bfe-7727-4584-93f2-9d09271bd42a"
],
"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/certificates
List all certificates on a gateway group
List TLS server certificates configured in the gateway group. Use filters such as labels, related SNI, expiration time, and search keywords to find certificates for rotation or troubleshooting.
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 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): Certificate.- oneOf variant 1: Certificate Reference
- oneOf variant 2: Certificate Content
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[].common_name(string, optional): The common name of the certificate.list[].subject_alt_names(array, optional): The subject alternative names of the certificate.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/certificates'