# Purging CDN Cache
Cache behavior depends on cache settings configuration and HTTP Headers returned by the origin server.
WARNING
Cache purging only affects content cached on CDN nodes. It cannot directly clear cache in end-user browsers.
# Enabling API Key for Cache Purging
- Log in to ByteArk Fleet (CDN) and select your target Web CDN Service
- Navigate to Settings menu, find the API Key section and click
# Purging Cache via User Interface
- Log in to ByteArk Fleet (CDN) and select your target Web CDN Service
- Go to Settings menu, locate the Cache Purger section, enter the URL to purge, then click
# Purging Cache via API
API endpoint: https://fleet.byteark.com/purge/<serviceid>/<apikey>
Pass the URL to purge as a query string parameter named 'url'
Example: Service ID = 255 API Key = TK90aQmdU22uFHL8 Target URL to purge: https://mycdn.example.com/mydata/selfie.jpg
curl -XPOST -d 'url=https://mycdn.example.com/mydata/selfie.jpg' \
https://fleet.byteark.com/purge/255/TK90aQmdU22uFHL8
1
2
2
Example JSON response.
{
"url":"https:\/\/mycdn.example.com\/mydata\/selfie.jpg",
"result":"success",
"node_purged":0,
"node_notcached":44,
"node_error":0,
"node_total":44
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
TIP
Bulk cache purging is not yet supported but will be added soon.