Get key details

POST https://daas.digicert.com/apicontroller/v1/key/getKeyDetails
Use this endpoint to get information about an SSH key.

Example requests and responses

cURL

curl --location --request POST 'https://daas.digicert.com/apicontroller/v1/key/getKeyDetails' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw ' {
	"ip": "10.100.33.105",
	"port": 22,
	"accountId": 5153289,
	"divisionId": 678010,
	"keyName": "1573175425789f5639e63ec2766ccdd6",
	"scanName": null
}'

200 OK

{
    "error": null,
    "data": {
	"securityLevel": "Not secure",
	"ip": "10.100.33.105",
	"port": 22,
	"type": "SSH",
	"supportedAuthMethods": ["gssapi-keyex", "gssapi-with-mic", "publickey"],
	"algorithm": "SSH RSA 2048",
	"protocol": "SSH2",
	"duplicates": true,
	"rotationElapsed": false,
	"firstDiscovered": 1626943436385,
        "createdDate": 1650442456390,
        "filePath":"/home/cwsadmin/19Apr2022_agent3.0/test/keycert3.pem",
        "isRootKey": false,
        "isOrphanKey": false,
        "source": "Agent",
        "lastDiscovered": 1650442456390,
        "serverHost": "19Apr2022",
        "isProtectedKey": false
	}
}

Request parameters

NameReq/OptTypeDescription
iprequiredstringIP address related to the key.
portrequiredintegerDefault SSH enabled port .
Default value: 22
accountIdrequiredstringAccount ID.
divisionIdrequiredintegerDivision ID.
keyNamerequiredstringName of the key.
scanNamerequiredstringName of the scan.

Response parameters

NameTypeDescription
errorobjectIncludes the error code, if any.
dataobjectObject container for response.
.. securityLevelstringSecurity status of the key.
Possible values: Secure, Not secure
.. ipstringIP address related to the key.
.. portintegerMost SSH configurations use the default port 22.
.. typestringType of the key.
Possible values: SSH
.. supportedAuthMethodsarrayList of methods configured on your server for authenticating the SSH key.
Possible values: gssapi-keyex, gssapi-with-mic, hostbased, keyboard-interactive, password, publickey, unavailable
.. algorithmstringHashing algorithm and keysize (or length) in bits of the SSH key.
Possible values: ECDSA 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.
… protocolstringProtocol used to set up an encrypted connection between the systems to communicate over the internet.
Possible values: SSH1, SSH2.
.. duplicatesbooleanIf true, the key has duplicates, otherwise, false.
.. rotationElapsedbooleanIf true, the timeframe for rotating the key has elapsed, and the key should be replaced. Otherwise, false.
.. 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
.. createdDateintegerDate and time when the key was created.
**Format:**epoch in millisecond.
Example: 1598299200000
.. filePathstringFile path of the key.
Values are comma-separated.
.. isRootKeybooleanWhether it is a 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.
.. lastDiscoveredintegerDate the key was last found by CertCentral Discovery scan.
.. serverHoststringServer host associated with the key.
.. isProtectedKeybooleanWhether it is a protected key.