Skip to main content

endpoints

Overview

Nameendpoints
TypeResource
Iddigitalocean.cdn.endpoints

Fields

NameDatatypeDescription
idstringA unique ID that can be used to identify and reference a CDN endpoint.
originstringThe fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space.
ttlintegerThe 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.
certificate_idstringThe ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
created_atstringA time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created.
custom_domainstringThe fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.
endpointstringThe fully qualified domain name (FQDN) from which the CDN-backed content is served.

Methods

NameAccessible byRequired ParamsDescription
get_endpointSELECTcdn_idTo show information about an existing CDN endpoint, send a GET request to /v2/cdn/endpoints/$ENDPOINT_ID.
list_endpointsSELECTTo list all of the CDN endpoints available on your account, send a GET request to /v2/cdn/endpoints.
create_endpointINSERTdata__originTo 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.
delete_endpointDELETEcdn_idTo delete a specific CDN endpoint, send a DELETE request to
/v2/cdn/endpoints/$ENDPOINT_ID.

A status of 204 will be given. This indicates that the request was processed
successfully, but that no response body is needed.
_get_endpointEXECcdn_idTo show information about an existing CDN endpoint, send a GET request to /v2/cdn/endpoints/$ENDPOINT_ID.
_list_endpointsEXECTo list all of the CDN endpoints available on your account, send a GET request to /v2/cdn/endpoints.
purge_cacheEXECcdn_id, data__filesTo purge cached content from a CDN endpoint, send a DELETE request to
/v2/cdn/endpoints/$ENDPOINT_ID/cache. The body of the request should include
a files attribute containing a list of cached file paths to be purged. A
path may be for a single file or may contain a wildcard (*) to recursively
purge all files under a directory. When only a wildcard is provided, all
cached files will be purged. There is a rate limit of 50 files per 20 seconds
that can be purged.
update_endpointsEXECcdn_idTo update the TTL, certificate ID, or the FQDN of the custom subdomain for
an existing CDN endpoint, send a PUT request to
/v2/cdn/endpoints/$ENDPOINT_ID.