https://www.example.com/pictures/icon.jpg?size=small
, specify /pictures/icon.jpg?size=small
.API request details
Field | Value |
---|---|
Method | POST |
URL | https://api.gcore.com/cdn/resources/{{resource_id}}/purge |
URL parameter | resource_id ID of the CDN resource that the content to purge belongs to |
Header | Authorization: Bearer {{access_token}} Content-Type: application/json |
Payload | 1. Purge by URL:json<br/>{<br/> "urls": [<br/> "/example1.jpg",<br/> "/img/example2.png",<br/> "/style.css?ver=2.0"<br/> ]<br/>}<br/> 2. Purge all: json<br/>{<br/> "paths": []<br/>}<br/> 3. Purge by pattern: json<br/>{<br/> "paths": [<br/> "/images/*"<br/> ]<br/>}<br/> |
Request parameter | paths 1. Purge by URL: (required, string) An array of one or more content URLs to purge 2. Purge all: An empty array. 3. Purge by pattern: (required, string) An array of one or more content patterns started with * or / . |
Response | 201 Created Returns an array of the purged URLs 400 Bad Request The user has exceeded the URL quota 401 Unauthorized The user does not have the correct authentication credentials 429 Too many requests The user has exceeded the request quota |
**{{resource_id}}**
with your actual value.
{{ }}
with your actual values.