Get key info

GET https://www.digicert.com/services/v2/key/{{key_id}}
Use this endpoint to get details about an API key.

Example requests and responses

curl -X GET \
  'https://www.digicert.com/services/v2/key/{{key_id}}' \
  -H 'Content-Type: application/xml' \
  -H 'X-DC-DEVKEY: {{api_key}}'
import requests

url = "https://www.digicert.com/services/v2/key/{{key_id}}"

headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/xml"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/key/{{key_id}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/xml")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/key/{{key_id}}',
  headers: 
   { 'Content-Type': 'application/xml',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
{
  "id": 184,
  "user": {
    "id": 125039,
    "first_name": "John",
    "last_name": "Smith"
  },
  "status": "active",
  "create_date": "2018-08-07T23:27:58+00:00",
  "last_used_date": "2018-08-18T19:08:19+00:00",
  "name": "Key Name",
  "is_legacy": false,
  "restricted_to_role_id": 0
}
{
  "id": 15,
  "user": {
    "id": 10,
    "first_name": "Jill",
    "last_name": "Valentine"
  },
  "status": "active",
  "create_date": "2018-11-20T22:27:47+00:00",
  "name": "ACME URL Name",
  "is_legacy": false,
  "restricted_to_role_id": 0,
  "acme_directory_url": "******nnAA",
  "product_name_id": "ssl_plus",
  "product_name": "Standard SSL",
  "organization_id": 123456,
  "organization_name": "STARS",
  "validity_days": "0",
  "validity_years": "2"
}

Response parameters

NameTypeDescription
idintKey ID.
userobjectDetails about the user linked to the key.
.. idintUser ID.
.. first_namestringFirst name of user.
.. last_namestringLast name of user.
statusstringKey status.
Possible values: active, revoked
create_datestringKey creation timestamp.
Format: UTC timezone and ISO 8601 date
last_used_datestringTimestamp of the last time the key was used.
Format: UTC timezone and ISO 8601 date
namestringName of the key.
is_legacyboolLegacy status of the key.
restricted_to_role_idintAccess role ID that limits API key permissions to a defined set of actions. See Glossary – API key roles.
acme_directory_urlstringObfuscated ACME directory URL. Only returned for ACME keys.
product_name_idstringName ID of the product ordered via ACME. Only returned for ACME keys. See Glossary – Product identifiers.
product_namestringFriendly name of the product ordered via ACME. Only returned for ACME keys. See Glossary – Product identifiers.
organization_idstringOrganization name associated with certificate orders via ACME. Only returned for ACME keys.
organizatin_namestringOrganization name associated with certificate orders via ACME. Only returned for ACME keys.
validity_daysstringNumber of days the certificate will be valid. Only returned for ACME keys.
validity_yearsstringNumber of years the certificate will be valid. Only returned for ACME keys.