POST /v2/cdn/endpoints

To create a new CDN endpoint, send a POST request to /v2/cdn/endpoints. The origin attribute must be set to the fully qualified domain name (FQDN) of a DigitalOcean Space. Optionally, the TTL may be configured by setting the ttl attribute.

A custom subdomain may be configured by specifying the custom_domain and certificate_id attributes.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
id String No

A unique ID that can be used to identify and reference a CDN endpoint.

ttl Integer No

The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded.

Possible values:

  • 3600
  • 600
  • 86400
  • 60
  • 604800

Default value: 3600

custom_domain String No

The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.

origin String Yes

The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space.

certificate_id String No

The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.

created_at String No

A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created.

endpoint String No

The fully qualified domain name (FQDN) from which the CDN-backed content is served.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.