# Purge CDN Cache

## Get CDN providers

> Get all enabled CDN providers for the planet

```json
{"openapi":"3.0.2","info":{"title":"Link11 WAAP","version":"v4.3"},"paths":{"/api/v4.3/purge-cdn-cache/providers":{"get":{"operationId":"get_enabled_cdn_providers_api_v3_reblaze_configs_cdn_providers_enabled__get_191271472328453069","summary":"Get CDN providers","description":"Get all enabled CDN providers for the planet","responses":{"200":{"content":{"application/json":{"schema":{"title":"Response Get CDN providers Api v4.3","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CdnProviderUnion"}}}}}},"description":"Enabled CDN providers retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedResponse"}}},"description":"Internal Server Error"}},"tags":["Purge CDN Cache"]}}},"components":{"schemas":{"CdnProviderUnion":{"type":"object","title":"CDN Provider Union","description":"Union of CDN Providers with specific fields based on the provider type.","discriminator":{"propertyName":"provider"},"oneOf":[{"title":"AWS CDN Provider","description":"Schema for AWS CDN Provider","properties":{"name":{"type":"string","minLength":1,"description":"Name of the CDN provider"},"provider":{"type":"string","enum":["aws"]},"distribution_id":{"type":"string","minLength":1,"description":"AWS-specific distribution ID"}},"required":["name","provider","distribution_id"],"additionalProperties":false},{"title":"GCP CDN Provider","description":"Schema for GCP CDN Provider","properties":{"provider":{"type":"string","enum":["gcp"]}},"required":["provider"],"additionalProperties":false},{"title":"Link11 CDN Provider","description":"Schema for Link11 CDN Provider","properties":{"provider":{"type":"string","enum":["link11"]}},"required":["provider"],"additionalProperties":false}]},"DetailedResponse":{"properties":{"message":{"title":"Message","type":"string"},"detail":{"title":"Detail","type":"string"},"data":{"type":"object","properties":{"message":{"title":"Message","type":"string"}}}},"required":["message","detail","data"],"title":"DetailedResponse","type":"object"}}}}
```

## Purge CDN Cache

> Purge CDN cache for a given list of CDN targets. All items in the list must be of the same type \
> (i.e., all AWS targets, all GCP targets, or all Link11 targets).<br>

```json
{"openapi":"3.0.2","info":{"title":"Link11 WAAP","version":"v4.3"},"paths":{"/api/v4.3/purge-cdn-cache/purge":{"post":{"operationId":"purge_cdn_cache_api_v3_reblaze_configs_cdn_providers_purge__post_162012920830015407","summary":"Purge CDN Cache","description":"Purge CDN cache for a given list of CDN targets. All items in the list must be of the same type \n(i.e., all AWS targets, all GCP targets, or all Link11 targets).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CdnTargetUnion"}}}}},"responses":{"200":{"description":"CDN cache purged successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputError"}}},"description":"Input Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedResponse"}}},"description":"Internal Server Error"}},"tags":["Purge CDN Cache"]}}},"components":{"schemas":{"CdnTargetUnion":{"type":"object","title":"CDN Target Union","description":"Union of CDN Providers Targets for cache purging with specific fields based on the provider type.","oneOf":[{"title":"AWS CDN Target","description":"Schema for AWS CDN Target","properties":{"host":{"type":"string","minLength":1,"description":"Host for purging. Must be \"all\"."},"path":{"type":"string","minLength":1,"description":"Path for purging. Should be \"all\" to purge all paths."},"distribution_id":{"minLength":1,"type":"string","description":"AWS-specific distribution ID"}},"required":["host","path","distribution_id"],"additionalProperties":false},{"title":"GCP CDN Target","description":"Schema for GCP CDN Target","properties":{"host":{"type":"string","minLength":1,"description":"Host for purging. Should be \"all\" to purge all hosts."},"path":{"type":"string","minLength":1,"description":"Path for purging. Should be \"all\" to purge all paths."}},"required":["host","path"],"additionalProperties":false},{"title":"Link11 CDN Target","description":"Schema for Link11 CDN Target","properties":{"host":{"type":"string","minLength":1,"description":"Host for purging. Should be \"all\" to purge all hosts."},"path":{"type":"string","minLength":1,"description":"Path for purging. Should be \"all\" to purge all paths."}},"required":["host","path"],"additionalProperties":false}]},"InputError":{"properties":{"code":{"title":"Code","type":"integer"},"message":{"title":"Message","type":"string"}},"required":["code","message"],"title":"InputError","type":"object"},"DetailedResponse":{"properties":{"message":{"title":"Message","type":"string"},"detail":{"title":"Detail","type":"string"},"data":{"type":"object","properties":{"message":{"title":"Message","type":"string"}}}},"required":["message","detail","data"],"title":"DetailedResponse","type":"object"}}}}
```

## Get CDN cache purge statuses

> Get all CDN cache purge statuses from the past week

```json
{"openapi":"3.0.2","info":{"title":"Link11 WAAP","version":"v4.3"},"paths":{"/api/v4.3/purge-cdn-cache/purges":{"get":{"operationId":"get_purge_statuses_api_v3_reblaze_configs_cdn_purges__get_191271472328453089","summary":"Get CDN cache purge statuses","description":"Get all CDN cache purge statuses from the past week","responses":{"200":{"description":"CDN purge statuses retrieved successfully","content":{"application/json":{"schema":{"title":"Response Get CDN Purge Statuses Api v4.3","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"CDN provider type","enum":["aws","gcp","link11"]},"target":{"oneOf":[{"$ref":"#/components/schemas/AwsCdnTarget"},{"$ref":"#/components/schemas/GcpCdnTarget"},{"$ref":"#/components/schemas/Link11CdnTarget"}],"description":"Target details for the specific CDN provider."},"status":{"type":"string","description":"The current status of the purge"},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the purge status"}}}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedResponse"}}}}},"tags":["Purge CDN Cache"]}}},"components":{"schemas":{"DetailedResponse":{"properties":{"message":{"title":"Message","type":"string"},"detail":{"title":"Detail","type":"string"},"data":{"type":"object","properties":{"message":{"title":"Message","type":"string"}}}},"required":["message","detail","data"],"title":"DetailedResponse","type":"object"}}}}
```
