CA List Certificates REST API - dogtagpki/pki GitHub Wiki

API v1

Request

  • Path: /ca/rest/certs

  • Method: GET

  • Query Parameters:

    • status: string

    • maxResults: integer

    • maxTime: integer

    • start: integer

    • size: integer

  • Content: None

Response

Success

  • Code: 200

Examples

API v1 with JSON
$ curl -k -H "Accept: application/json" -s https://$HOSTNAME:8443/ca/rest/certs | python -m json.tool
{
    "total": 6,
    "entries": [
        {
            "id": "0x1",
            "SubjectDN": "CN=Certificate Authority,O=EXAMPLE",
            "IssuerDN": "CN=Certificate Authority,O=EXAMPLE",
            "Status": "VALID",
            "Type": "X.509",
            "Version": 2,
            "KeyAlgorithmOID": "1.2.840.113549.1.1.1",
            "KeyLength": 2048,
            "NotValidBefore": "1622231586000",
            "NotValidAfter": "2253383586000",
            "IssuedOn": "1622231586000",
            "IssuedBy": "system",
            "RevokedOn": null,
            "RevokedBy": null,
            "Link": {
                "rel": "self",
                "href": "https://localhost.localdomain:8443/ca/rest/certs/0x1",
                "type": "application/xml"
            }
        },
        ...
    ],
    "Link": []
}
API v1 with XML
$ curl -k -H "Accept: application/xml" -s https://$HOSTNAME:8443/ca/rest/certs | xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CertDataInfos>
  <entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="certDataInfo" id="0x1">
    <IssuedBy>system</IssuedBy>
    <IssuedOn>1629122842000</IssuedOn>
    <IssuerDN>CN=Certificate Authority,O=EXAMPLE</IssuerDN>
    <KeyAlgorithmOID>1.2.840.113549.1.1.1</KeyAlgorithmOID>
    <KeyLength>2048</KeyLength>
    <Link>
      <href>https://localhost.localdomain:8443/ca/rest/certs/0x1</href>
      <relationship>self</relationship>
    </Link>
    <NotValidAfter>2260274841000</NotValidAfter>
    <NotValidBefore>1629122841000</NotValidBefore>
    <Status>VALID</Status>
    <SubjectDN>CN=Certificate Authority,O=EXAMPLE</SubjectDN>
    <Type>X.509</Type>
    <Version>2</Version>
  </entries>
  ...
  <total>6</total>
  <CertDataInfo id="0x1">
    <IssuedBy>system</IssuedBy>
    <IssuedOn>1629122842000</IssuedOn>
    <IssuerDN>CN=Certificate Authority,O=EXAMPLE</IssuerDN>
    <KeyAlgorithmOID>1.2.840.113549.1.1.1</KeyAlgorithmOID>
    <KeyLength>2048</KeyLength>
    <Link>
      <href>https://localhost.localdomain:8443/ca/rest/certs/0x1</href>
      <relationship>self</relationship>
    </Link>
    <NotValidAfter>2260274841000</NotValidAfter>
    <NotValidBefore>1629122841000</NotValidBefore>
    <Status>VALID</Status>
    <SubjectDN>CN=Certificate Authority,O=EXAMPLE</SubjectDN>
    <Type>X.509</Type>
    <Version>2</Version>
  </CertDataInfo>
  ...
</CertDataInfos>

See Also

⚠️ **GitHub.com Fallback** ⚠️