pydo.cdn.get_endpoint()

Description

To show information about an existing CDN endpoint, send a GET request to /v2/cdn/endpoints/$ENDPOINT_ID.

Parameters

Name Type Required Description Default Value
cdn_id string True A unique identifier for a CDN endpoint.

Request Sample

import os
from pydo import Client

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

get_resp = client.cdn.get_endpoint(cdn_id="aa34ba1")

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 an endpoint key. This will be set to an object containing the standard CDN endpoint attributes.

Click to expand an example response for CDN Endpoint.
{
  "value": {
    "endpoint": {
      "id": "19f06b6a-3ace-4315-b086-499a0e521b76",
      "origin": "static-images.nyc3.digitaloceanspaces.com",
      "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com",
      "created_at": "2018-07-19T15:04:16Z",
      "ttl": 3600
    }
  }
}
Click to expand an example response for CDN Endpoint With Custom Domain.
{
  "value": {
    "endpoint": {
      "id": "19f06b6a-3ace-4315-b086-499a0e521b76",
      "origin": "static-images.nyc3.digitaloceanspaces.com",
      "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com",
      "created_at": "2018-07-19T15:04:16Z",
      "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
      "custom_domain": "static.example.com",
      "ttl": 3600
    }
  }
}

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"
}