pydo.certificates.get()

Description

To show information about an existing certificate, send a GET request to /v2/certificates/$CERTIFICATE_ID.

Parameters

Name Type Required Description Default Value
certificate_id string True A unique identifier for a certificate.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

get_resp = client.certificates.get(
    certificate_id="892071a0-bb95-49bc-8021-3afd67a210bf"
)

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

The response will be a JSON object with a certificate key. This will be set to an object containing the standard certificate attributes.

Click to expand an example response for Custom Certificate.
{
  "value": {
    "certificate": {
      "id": "892071a0-bb95-49bc-8021-3afd67a210bf",
      "name": "web-cert-01",
      "not_after": "2017-02-22T00:23:00Z",
      "sha1_fingerprint": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7",
      "created_at": "2017-02-08T16:02:37Z",
      "dns_names": [
        ""
      ],
      "state": "verified",
      "type": "custom"
    }
  }
}
Click to expand an example response for Let’s Encrypt Certificate.
{
  "value": {
    "certificate": {
      "id": "ba9b9c18-6c59-46c2-99df-70da170a42ba",
      "name": "web-cert-02",
      "not_after": "2018-06-07T17:44:12Z",
      "sha1_fingerprint": "479c82b5c63cb6d3e6fac4624d58a33b267e166c",
      "created_at": "2018-03-09T18:44:11Z",
      "dns_names": [
        "www.example.com",
        "example.com"
      ],
      "state": "verified",
      "type": "lets_encrypt"
    }
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}