List CertView Certificates (v1)

POST/certview/v1/certificates

Use these API functions to List CertView Certificates to retrieve a list of certificates based on an input filter query and list.

The response contains certificate details, including associated host information and SSL/TLS-related vulnerabilities and grades.

 You can see only those assets that have been assigned by your manager user. When you send an API request, you can access information about the assets and their corresponding certificates assigned to you, based on scope. For more information on tag-based user scoping refer to Certificate View Online help.

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

filter 

Optional String

Filter the events list by providing a query using

Qualys syntax. Refer to the How to Search topic in the online

help for assistance with creating your query.

For example - expiryGroup: Expired

Refer to the list of tokens you can use to build the query:

Search tokens

pageNumber 

Optional Integer

The page to be returned. Starts from zero.

pageSize 

Optional Integer

Provide the number of records per page to be included in the response.

Default: 10.

Maximum: 200

For example, the total result set is 50 assets. If the page size is

specified as 10, then the result is divided in 5 pages with 10

assets each.

sort 

Optional String

Sort the results using a Qualys token.

For example - [{"lastFound":"desc"}]

Authorization 

Mandatory String

Authorization token to authenticate to the Qualys Cloud Platform.

Prepend token with "Bearer" and one space.

For example - Bearer authToken

certificateDetails 

Optional String

Define the level of certificate attributes you want to list. Default value basic is used to fetch commonly used attributes. Use value extended to fetch these additional attributes:

  • Serial number

  • Auth Key Identifier

  • Subject Key Identifier

  • Key Usage

  • Base64 certificate

  • Enhanced Key Usage

The enhancedKeyUsage attribute returns a list of OIDs in the EKU attribute of the certificate.

Some of the most commonly used OIDs are:

  • 1.3.6.1.5.5.7.3.1—Server Authentication

  • 1.3.6.1.5.5.7.3.2—Client Authentication

  • 1.3.6.1.5.5.7.3.3—Code Signing

  • 1.3.6.1.5.5.7.3.4—Email Protection

  • 1.3.6.1.5.5.7.3.8—Time Stamping

  • 1.3.6.1.5.5.7.3.9—OCSP Signing

 For more information, refer to http://www.oid-info.com/

Notes:

You can use the following filters for better results:

Sample with all Parameters Defined Sample with all Parameters Defined

API Request

 curl -X POST 
"<qualys_base_url>/certview/v1/certificates" 
-H "Accept: application/json" 
-H "Content-Type: application/json" 
-d "{ \"filter\" : \"subject.name:www.qualys.com\", \"pageNumber\": 0, \"pageSize\" : 1}"
 -H "Authorization: Bearer <JWT Token>"
    

Response

[
    {
        "keySize": 2048,
        "subject": {
            "organization": "Qualys, Inc.",
            "locality": "Foster City",
            "name": "www.qualys.com",
            "state": "California",
            "country": "US",
            "organizationUnit": []
        },
        "validFrom": 1676246400000,
        "signatureAlgorithm": "SHA256withRSA",
        "issuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert SHA2 Extended Validation Server CA",
            "country": "US",
            "state": "",
            "certhash": "403e062a2653059113285baf80a0d4ae422c848c9f78fad01fc94bc5b87fef1a",
            "locality": ""
        },
        "rootissuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert High Assurance EV Root CA",
            "country": "US",
            "state": "",
            "certhash": "7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "locality": ""
        },
        "instanceCount": 2,
        "dn": "CN=www.qualys.com, O=\"Qualys, Inc.\", L=Foster
    City, ST=California, C=US, serialNumber=3152140,
    businessCategory=Private Organization, StateOrProvince=Delaware,
    CountryName=US","certhash": "192a86240c5ec5d87dd108f17e2543e78439101f193c99c53193f60d115b885d",
        "assets": [
            {
                "netbiosName": "",
                "assetId": "99f29795-4c11-49e1-8898-82e9982b0710",
                "name": "qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fadd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1680247510486,
                "updated": 1680247131000,
                "assetInterfaces": [
                    {
                        "hostname": "qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            },
            {
                "netbiosName": "",
                "assetId": "646c7aa5-cfdc-4294-bea7-d43664ac03f4",
                "name": "www.qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fadd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1675158036000,
                "updated": 1680254412000,
                "assetInterfaces": [
                    {
                        "hostname": "www.qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            }
        ],
        "selfSigned": false,
        "validTo": 1707868799000,
        "issuerCategory": "DigiCert SHA2 Extended Validation Server
    CA","subjectAlternativeNames": {
            "DNS Name": [
                "www.qualys.com",
                "qualys.com",
                "docs.qualys.com",
                "qualys.dk",
                "qualys.us",
                "qualys.de",
                "qualys.biz",
                "nemeannetworks.com",
                "qualys.fr",
                "www.qualys.eu",
                "qualys.io",
                "qualysguard.tw",
                "www.securityvibes.co.uk",
                "qualys.es",
                "qualysblog.net",
                "qualys.nl",
                "qualys.report",
                "qualysinsight.com",
                "qualysworks.net",
                "qualysguard.eu",
                "qualysguard.com",
                "qualys.eu",
                "www.qualysguard.eu"
            ],
            "IP Address": null
        },
        "lastFound": 1680256864611,
        "extendedValidation": true,
        "sources": [
            "VM",
            "QAGENT"
        ]
    }
]
    

Sample with Certificate Details Parameter set to BasicSample with Certificate Details Parameter set to Basic

API Request

 curl -X POST
 "<qualys_base_url>/certview/v1/certificates" -H "Accept: application/json" -H "Content-Type: application/json" -d "{ \"filter\" : \"subject.name:www.qualys.com\", \"pageNumber\": 0, \"pageSize\" : 1, \"certificateDetails\": \"basic\"}" -H "Authorization: Bearer <JWT Token>"
    

Response

[
    {
        "keySize": 2048,
        "subject": {
            "organization": "Qualys, Inc.",
            "locality": "Foster City",
            "name": "www.qualys.com",
            "state": "California",
            "country": "US",
            "organizationUnit": []
        },
        "validFrom": 1676246400000,
        "signatureAlgorithm": "SHA256withRSA",
        "issuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert SHA2 Extended Validation Server CA",
            "country": "US",
            "state": "",
            "certhash": "403e062a2653059113285baf80a0d4ae422c848c9f78fad01fc94bc5b87fef1a",
            "locality": ""
        },
        "rootissuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert High Assurance EV Root CA",
            "country": "US",
            "state": "",
            "certhash": "7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "locality": ""
        },
        "instanceCount": 2,
        "dn": "CN=www.qualys.com, O=\"Qualys, Inc.\", L=Foster
City, ST=California, C=US, serialNumber=3152140,
businessCategory=Private Organization, StateOrProvince=Delaware,
CountryName=US","certhash": "192a86240c5ec5d87dd108f17e2543e78439101f193c99c53193f60d115b885d",
        "assets": [
            {
                "netbiosName": "",
                "assetId": "99f29795-4c11-49e1-8898-82e9982b0710",
                "name": "qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fadd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1680247510486,
                "updated": 1680247131000,
                "assetInterfaces": [
                    {
                        "hostname": "qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            },
            {
                "netbiosName": "",
                "assetId": "646c7aa5-cfdc-4294-bea7-d43664ac03f4",
                "name": "www.qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fadd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1675158036000,
                "updated": 1680254412000,
                "assetInterfaces": [
                    {
                        "hostname": "www.qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            }
        ],
        "selfSigned": false,
        "validTo": 1707868799000,
        "issuerCategory": "DigiCert SHA2 Extended Validation Server
            CA","subjectAlternativeNames": {
            "DNS Name": [
                "www.qualys.com",
                "qualys.com",
                "docs.qualys.com",
                "qualys.dk",
                "qualys.us",
                "qualys.de",
                "qualys.biz",
                "nemeannetworks.com",
                "qualys.fr",
                "www.qualys.eu",
                "qualys.io",
                "qualysguard.tw",
                "www.securityvibes.co.uk",
                "qualys.es",
                "qualysoblog.net",
                "qualys.nl",
                "qualys.report",
                "qualysinsight.com",
                "qualysworks.net",
                "qualysguard.eu",
                "qualysguard.com",
                "qualys.eu",
                "www.qualysguard.eu"
            ],
            "IP Address": null
        },
        "lastFound": 1680256864611,
        "extendedValidation": true,
        "sources": [
            "VM",
            "QAGENT"
        ]
    }
]
    

Sample with Certificate Details Parameter set to ExtendedSample with Certificate Details Parameter set to Extended

API Request

 curl -X POST 
 "<qualys_base_url>/certview/v1/certificates" 
-H "Accept: application/json" -H "Content-Type: application/json" 
-d "{ \"filter\" : \"subject.name:www.qualys.com\", \"pageNumber\": 0, \"pageSize\" : 1, \"certificateDetails\": \"extended\"}"
 -H "Authorization: Bearer <JWT Token>"
    

Response

  [
    {
        "keySize": 2048,
        "subject": {
            "organization": "Qualys, Inc.",
            "locality": "Foster City",
            "name": "www.qualys.com",
            "state": "California",
            "country": "US",
            "organizationUnit": []
        },
        "validFrom": 1676246400000,
        "signatureAlgorithm": "SHA256withRSA",
        "issuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert SHA2 Extended Validation Server CA",
            "country": "US",
            "state": "",
            "certhash": "403e062a2653059113285baf80a0d4ae422c848c9f78fad01fc94bc5b87fef1a",
            "locality": ""
        },
        "rootissuer": {
            "organization": "DigiCert Inc",
            "organizationUnit": [
                "www.digicert.com"
            ],
            "name": "DigiCert High Assurance EV Root CA",
            "country": "US",
            "state": "",
            "certhash": "7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "locality": ""
        },
        "instanceCount": 2,
        "dn": "CN=www.qualys.com, O=\"Qualys, Inc.\", L=Foster City,
ST=California, C=US, serialNumber=3152140,
businessCategory=Private Organization, StateOrProvince=Delaware,
CountryName=US","certhash": "192a86240c5ec5d87dd108f17e2543e78439101f193c99c53193f60d115b885d",
        "assets": [
            {
                "netbiosName": "",
                "assetId": "99f29795-4c11-49e1-8898-82e9982b0710",
                "name": "qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fa-dd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1680247510486,
                "updated": 1680247131000,
                "assetInterfaces": [
                    {
                        "hostname": "qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            },
            {
                "netbiosName": "",
                "assetId": "646c7aa5-cfdc-4294-bea7-d43664ac03f4",
                "name": "www.qualys.com",
                "operatingSystem": "NetScaler",
                "tags": [
                    {
                        "name": "Internet Facing Assets",
                        "uuid": "d2ba3be1-66a3-4d1f-89fa-dd534a2bccc1"
                    }
                ],
                "primaryIp": "64.39.xx.xxx",
                "hostInstances": [
                    {
                        "protocol": "tcp",
                        "sslProtocols": [
                            "TLSv1.2"
                        ],
                        "port": 443,
                        "grade": "A",
                        "service": "http",
                        "vulnerabilities": [],
                        "vulnCount": 0
                    }
                ],
                "created": 1675158036000,
                "updated": 1680254412000,
                "assetInterfaces": [
                    {
                        "hostname": "www.qualys.com",
                        "address": "64.39.xx.xxx"
                    }
                ],
                "certificateCount": 0
            }
        ],
        "selfSigned": false,
        "validTo": 1707868799000,
        "issuerCategory": "DigiCert SHA2 Extended Validation Server
    CA","serialNumber": "05e2ad055846148575bc6476367916b7",
        "subjectAlternativeNames": {
            "DNS Name": [
                "www.qualys.com",
                "qualys.com",
                "docs.qualys.com",
                "qualys.dk",
                "qualys.us",
                "qualys.de",
                "qualys.biz",
                "nemeannetworks.com",
                "qualys.fr",
                "www.qualys.eu",
                "qualys.io",
                "qualysguard.tw",
                "www.securityvibes.co.uk",
                "qualys.es",
                "qualysoblog.net",
                "qualys.nl",
                "qualysguard.eu",
                "qualysguard.com",
                "qualys.eu",
                "www.qualysguard.eu"
            ],
            "IP Address": null
        },
        "lastFound": 1680256864611,
        "extendedValidation": true,
        "keyUsage": [
            "Digital signature",
            "Key encipherment"
        ],
        "rawData": "-----BEGIN CERTIFICATE-----
    \nMIIIgjCCB2qgAwIBAgIQBeKtBVhGFIV1vGR2NnkWtzANBgkqhkiG9w0BAQsFADB1
.
.
.
\n3qJWZEALApKny0Ee3wTSgny5BNwo2Q==\n-----END CERTIFICATE-----\n","enhancedKeyUsage": [
            "1.3.6.1.5.5.7.3.1",
            "1.3.6.1.5.5.7.3.2"
        ],
        "subjectKeyIdentifier": "09e86635b5be04d2e15799575902a92d7e330fba",
        "authKeyIdentifier": "3dd350a5d6a0adeef34a600a65d321d4f8f8d60f",
        "sources": [
            "VM",
            "QAGENT"
        ]
    }
]