API7 Docs

Check if a certificate exists in a gateway group

POST /api/gateway_groups/{gateway_group_id}/certificates/exists

POST /api/gateway_groups/{gateway_group_id}/certificates/exists

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

gateway_group_id*string

Gateway group ID.

Length1 <= length

Request Body

application/json

Response Body

application/json

application/json

curl -X POST "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/certificates/exists" \  -H "Content-Type: application/json" \  -d '{}'

Successfully retrieved the certificate.

{
  "value": {
    "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
  }
}
Complete operation details and schema variants

POST /api/gateway_groups/{gateway_group_id}/certificates/exists

Check if a certificate exists in a gateway group

IAM Action: gateway:GetCACertificate, Resource: arn:api7:gateway:gatewaygroup/%s

Parameters

  • gateway_group_id (path, string, required): Gateway group ID.

Request body

Content type: application/json

  • cert (string, optional): Certificate.
  • oneOf variant 1: Certificate Reference
  • oneOf variant 2: Certificate Content

Responses

  • 200: Successfully retrieved the certificate.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional): The Certificate response format, with filtering the sensitive fields and some other fields.
  • allOf variant 1
  • value.name (string, optional): The object name.
  • value.desc (string, optional): The object description.
  • value.cert (string, optional): Certificate.
  • oneOf variant 1: Certificate Reference
  • oneOf variant 2: Certificate Content
  • value.labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • value.id (string, optional): The object ID.
  • value.created_at (integer, optional): The object created timestamp.
  • value.updated_at (integer, optional): The object updated timestamp.
  • value.common_name (string, optional): The common name of the certificate.
  • value.subject_alt_names (array, optional): The subject alternative names of the certificate.
  • value.associated_snis (array, optional): The SNI IDs associated with the certificate.
  • value.exptime (integer, optional): The SSL certificate expire time.
  • value.validity_start (integer, optional): The earliest time when the SSL certificate is used.
  • value.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 POST '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/certificates/exists'