Purge a cached asset (DELETE /v1/services/{service_id}/assets)

Purge cached assets from the specified service from the edge server at the specified relative URL.

Deletion applies to both HTTP and HTTPS.

When processing a large number of files, the status code 429 may be returned. If you want to disable content in batch, use the content-refresh behavior through the edit service API.

The table below lists the main status codes and X-Message header values.

Status code X-Message
202 Accepted: Request was received.

Note: Requests can be received even if the target content does not exist on the edge server.

400 Invalid entry for url/action: Invalid value
400 Service is undeployed: The service is disabled
409 Service is in progress: Another process is in progress
429 Rate limit exceeded: Too many requests. Wait for a few moments, and then execute again

Request Headers

Refer to "Common API request headers".

Request parameters

service_id

The service_id indicating the service

Data Type Cardinality
String 1..1

action

Deletion operation
  • delete: Deletes the cache (default)
  • invalidate: Disables the cache
Data Type Cardinality
String 0..1

url

Relative path of the URL of the asset to delete. The upper limit for the delivery combined with the delivery FQDN is approximately 1 KB. If this is exceeded, the "400 Invalid entry for url" code is returned.

Example: directory/file.jpg

Data Type Cardinality
String 1..1

Request Elements

None.

Response Headers

Refer to "Common API response headers".

X-Estimated-Seconds

The estimated time (seconds) until deletion of the cache is reflected

Data Type Cardinality
String 1..1

Response Elements

None.

Example of Response


       DELETE /v1/services/d8fdaa40-fa39/assets? action=invalidate&url=solutions/img/img-06.jpg
       
       HTTP/1.1 202 Accepted
       X-Message: Accepted
       X-Estimated-Seconds: 5
       Content-Length: 0