List keys

POST https://daas.digicert.com/apicontroller/v1/key/list
Use this endpoint to get a list with details about your SSH keys.

For more information about SSH keys and how to discover SSH keys configured on your server, see SSH keys.

Example requests and responses

cURL

curl --location --request POST 'https://daas.digicert.com/apicontroller/v1/key/list' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw 
'{
    "accountId": 5153184,
    "searchCriteriaList": [{
        "key": "keyName",
        "operation": "EQUALS",
        "value": ["f83d1b65a899a602c5c026beb32f21fd119b5976b34c16fb27496b5d68f3405a"]
    }, {
        "key": "keyIp",
        "operation": "EQUALS",
        "value": ""
    }, {
        "key": "keyPath",
        "operation": "EQUALS",
        "value": "C:\\Certbotold1\\archive\\17feb202001.cert-testing.com\\privkey10.pem"
    }],
    "divisionIds": [],
    "isDuplicateKeyList": true,
    "startIndex": 1,
    "pageSize": 50,
    "filterSelected": "keyName",
    "sortedColumnId": "ip",
    "sortOrder": "ASC"
}'

200 OK

{
    "error": null,
    "data": {
        "totalCount": 1,
        "currentCount": 1,
        "totalKeys": 0,
        "keyDetailsList": [{
            "keyName": null,
            "securityLevel": "Not secure",
            "ip": "",
            "port": null,
            "type": "RSA",
            "firstDiscovered": 1650259868203,
            "duplicateCount": null,
            "scanName": "",
            "protocol": null,
            "filePath": "C:\\Certbotold1\\keys\\0049_key-certbot.pem",
            "isRootKey": null,
            "isOrphanKey": null,
            "source": null,
            "serverHost": "Box64",
            "isProtectedKey": null
        }]
    }
}

Request parameters

NameReq/OptTypeDescription
accountIdrequiredstringAccount ID.
searchCriteriaListoptionalarrayFilter results by specified values. The array includes key, operation and value. For definitions, see the Filter options for searchCriteriaList table below.
Example:
divisionIdsrequiredarrayUser’s division IDs.
startIndexoptionalintegerIndex of the first result.
Default: 1
pageSizeoptionalintegerNumber of records per page.
Allowed values: 0 to 512
Default: 50
filterSelectedrequiredstringThe value to show in the results for each sensor that meets the search criteria.
Allowed values: name, ip, port, type, scanName, authenticationMethods, keyAlgorithm, protocol, duplicateKeys,userName, source, filePath, serverHost, orphanKeys
isDuplicateKeyListrequiredbooleanWhether any duplicate key exist.
Default: true
sortedColumnIdoptionalstringSort results by specified parameter.
Allowed values: serialNumber, ip, port, scanName, serverSecurity, isCertPresent, cn
Default: ip
sortOrderoptionalstringSort direction.
Allowed values: DESC (descending: 9-0, Z-A), ASC (ascending: 0-9, A-Z)
Default: DESC

Response parameters

NameTypeDescription
errorobjectIncludes error codes, if any.
dataobjectObject with information about the filter results.
.. totalCountintegerTotal number of keys based on the filter criteria.
.. currentCountintegerNumber of records on current page.
.. keydetailListarrayContainer for key details.
.. .. keyNamestringKey name.
Max length: 80 characters.
.. .. securityLevelstringSecurity status of the key.
Possible values: Secure, Not secure
.. .. ipstringIP address related to the key.
.. .. portintegerDefault SSH enabled port.
.. .. typestringType of the key.
Possible values: SSH
.. .. firstDiscoveredintegerTimestamp for when the key was first discovered.
**Format:**epoch in millisecond.
Epoch corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system.
Example: 1596781119000
.. .. duplicateCountintegerNumber of duplicates detected for the key.
.. .. scanNamestringScan associated with the key.
.. .. protocolstringProtocol used to set up an encrypted connection between the systems to communicate over the internet.
Possible values: SSH1, SSH2.
.. .. filepathstringThe file path from where the key is discovered.
.. .. isRootKeybooleanWhether it is a type of root key.
.. .. isOrphanKeybooleanWhether it is an orphan key.
A key is orphaned when it cannot be used further because the pair is no longer on the server.
.. .. sourcestringThe source used to identify the key.
Possible values: Agent, Sensor.
.. .. serverHoststringThe server host associated with the key.
.. .. isProtectedKeybooleanWhether it is a protected key.

Filter options for searchCriteriaList

The array includes key, operation and value.

KeyOperationValue
userNameEQUALSCert Central Admin, system
keyNameEQUALSKey name
ipEQUALSIP address
keyPathEQUALSPath to the key
portEQUALS22
authenticationMethodsEQUALSgssapi-keyex, gssapi-with-mic, hostbased., keyboard-interactive, password, publickey, unavailable
duplicateKeysEQUALSNo, Yes
typeEQUALSSSH
rotationLimitEQUALS6 months, 9 months1 year, 2 years.
keyAlgorithmEQUALSECDSA SHA2 NISTP256 256, RSA1 1024, RSA1 2048, SSH DSS 1024, SSH RSA 1024, SSH ED25519 256, SSH RSA 2048, SSH RSA 3072, SSH RSA 4096.
protocolEQUALSSSH1, SSH2
scanNameEQUALSScan name