API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsParse an SSL certificate

Parse an SSL certificate

PUT /api/parse_certificate

PUT /api/parse_certificate

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Request Body

application/json

Response Body

application/json

application/json

curl -X PUT "$API_BASE_URL/api/parse_certificate" \  -H "Content-Type: application/json" \  -d '{    "cert": "-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----"  }'

Successfully parsed the certificate and returned its metadata.

{
  "total": 1,
  "list": [
    {
      "common_name": "example.com",
      "subject_alt_names": [
        "www.example.com"
      ],
      "snis": [
        "string"
      ],
      "not_before": "2019-08-24T14:15:22Z",
      "not_after": "2019-08-24T14:15:22Z",
      "subject": "string",
      "issuer": "string",
      "serial_number": "string",
      "signature_algorithm": "string",
      "extensions": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}
Complete operation details and schema variants

PUT /api/parse_certificate

Parse an SSL certificate

Parameters

Request body

Content type: application/json

  • cert (string, required): The certificate in PEM format.

Responses

  • 200: Successfully parsed the certificate and returned its metadata.
  • 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 metadata.
  • 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[].snis (array, optional):
  • list[].not_before (string,null, optional):
  • list[].not_after (string,null, optional):
  • list[].subject (string, optional):
  • list[].issuer (string, optional):
  • list[].serial_number (string, optional):
  • list[].signature_algorithm (string, optional):
  • list[].extensions (object,null, optional):
  • 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 PUT '$API_BASE_URL/api/parse_certificate'