DigitalOcean-public.v2-new_CDN Endpoints
Create a New CDN Endpoint
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.
post/v2/cdn/endpoints
Request body
Example request
{
"id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"origin": "static-images.nyc3.digitaloceanspaces.com",
"endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com",
"ttl": 3600,
"certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"custom_domain": "static.example.com",
"created_at": "2018-03-21T16:02:37Z"
}Response
The response will be a JSON object with an endpoint key. This will be set to an object containing the standard CDN endpoint attributes.
Example response
{
"endpoint": {
"id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"origin": "static-images.nyc3.digitaloceanspaces.com",
"endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com",
"ttl": 3600,
"certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
"custom_domain": "static.example.com",
"created_at": "2018-03-21T16:02:37Z"
}
}