v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_CDN Endpoints

Purge the Cache for an Existing CDN Endpoint

To 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. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API's rate limit. Two identical purge requests cannot be sent at the same time.

delete/v2/cdn/endpoints/{cdn_id}/cache

Path parameters

cdn_idstring uuid required

A unique identifier for a CDN endpoint.

Request body

filesstring[] required

An array of strings containing the path to the content to be purged from the CDN cache.

Example request

{
  "files": [
    "path/to/image.png",
    "path/to/css/*"
  ]
}

Response

The action was successful and the response body is empty.