Get certificate details
/rest/{version}/configuration/certificates
Request
-
version(required):
REST API version string.
Available values: v1.2
-
format(required):
Format the certificate-record to be retrieved
-
recordName(required):
Name of the certificate
-
Authorization(required):
The value in the Authorization header must be the string "
Bearer {access token}
", where{access token}
is a valid, unexpired token received in response to a prior/rest/{version}/auth/token
request.
Response
200 Response
400 Response
401 Response
404 Response
Examples
Example of Accessing the API with cURL
The following example shows how to get certificate details by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${HOSTNAME}/rest/v1.2/configuration/certificates?recordName=rest-server&format=detail"
Example of Accessing the API with Python
The following example shows how to get certificate details by submitting a GET request on the REST resource using Python.
This example assumes you have a valid token stored in the token
variable. For an example of authenticating
with Python, see Authenticate.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url = "https://" + hostname + "/rest/v1.2/configuration/certificates?recordName=rest-server&format=detail"
resp = requests.get(url, headers=headers)
Example of the Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<CertificateRecordDetails>
<certificateRecord>rest-server</certificateRecord>
<data>
<version>3 (0x2)</version>
<serialNumber>11 (0xb)</serialNumber>
<signatureAlgorithm>sha1WithRSAEncryption</signatureAlgorithm>
<issuer>
<country>US</country>
<state>MA</state>
<locality>Burlington</locality>
<organization>Engineering</organization>
<commonName>Acme Packet MA</commonName>
<emailAddress>acme@example.com</emailAddress>
</issuer>
<validity>
<notBefore>2020-02-13T20:00:54Z</notBefore>
<notAfter>2025-02-12T20:00:54Z</notAfter>
</validity>
<subject>
<country>US</country>
<state>MA</state>
<organization>Eng</organization>
<commonName>Acme</commonName>
</subject>
<x509V3Extensions>X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
21:9D:E1:C3:E7:CA:4A:F7:B3:47:0F:4E:FB:F1:2B:31:8F:31:D5:12
X509v3 Authority Key Identifier:
keyid:D6:56:81:C0:7B:07:F5:3F:A2:18:A6:F5:70:8D:34:92:1B:73:EC:4C
DirName:/C=US/ST=MA/L=Burlington/O=Engineering/CN=Acme Packet MA/emailAddress=acme@example.com
serial:DA:76:D0:86:25:E5:AB:E4
X509v3 Key Usage:
Digital Signature, Key Encipherment
</x509V3Extensions>
</data>
</CertificateRecordDetails>
</data>
<messages/>
<links/>
</response>