Jobs
Name | Method | Path |
---|---|---|
get | /v3/cdn/{id}/job-log/{type} | |
get | /v3/cdn/{id}/job/{jobId} | |
post | /v3/cdn/{id}/job/prefetch | |
post | /v3/cdn/{id}/job/purge | |
post | /v3/cdn/{id}/job/purge-all |
List of jobs
Returns a filtered list of jobs for a given CDN Resource and type.
gethttps://api.cdn77.com/v3/cdn/{id}/job-log/{type}
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
There are three types of jobs: purge: instantly removes cached content from all enabled datacenters purge-all: instantly removes all cached content from all enabled datacenters prefetch: prepopulates newly added content to the CDN cache.
Available values: purge,prefetch,purge-all,
Responses
// response
[
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"type": "purge",
"cdn": {
"id": 1234567890
},
"paths_count": 100,
"state": "done",
"queued_at": "2023-09-27T09:30:04.732Z",
"done_at": "2023-09-27T09:30:04.732Z"
}
]
Detail of job
Returns detailed information regarding particular data manipulation API request.
gethttps://api.cdn77.com/v3/cdn/{id}/job/{jobId}
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Job ID
Responses
// response
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"type": "purge",
"cdn": {
"id": 1234567890
},
"paths": [
"/sub/img.png"
],
"ignored_paths": [
"/sub/img.png/*"
],
"paths_count": 100,
"state": "done",
"queued_at": "2023-09-27T09:30:04.731Z",
"done_at": "2023-09-27T09:30:04.731Z"
}
Prefetch
Allows you to prepopulate certain files into CDN cache on all datacenters. Useful for reducing load on your origin server coming from a new content.
posthttps://api.cdn77.com/v3/cdn/{id}/job/prefetch
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Request bodyrequired
// request body
{
"paths": [
"/sub/img.png"
],
"upstream_host": "your-domain.com"
}
List of file paths, that are being processed in the job.
Is required when host header forwarding is active on your CDN Resource.
Responses
// response
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"type": "prefetch",
"cdn": {
"id": 1234567890
},
"paths": [
"/sub/img.png"
],
"paths_count": 100,
"ignored_paths": [
"/sub/img.png/*"
],
"upstream_host": "your-domain.com",
"state": "done",
"queued_at": "2023-09-27T09:30:04.732Z",
"done_at": "2023-09-27T09:30:04.732Z"
}
Purge
Allows you to rotate certain files out of the cache. Particularly useful to prevent stale response.
posthttps://api.cdn77.com/v3/cdn/{id}/job/purge
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Request bodyrequired
// request body
{
"paths": [
"/sub/img.png"
]
}
List of file paths, that are being processed in the job.
Responses
// response
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"type": "purge",
"cdn": {
"id": 1234567890
},
"paths": [
"/sub/img.png"
],
"paths_count": 100,
"ignored_paths": [
"/sub/img.png/*"
],
"state": "done",
"queued_at": "2023-09-27T09:30:04.732Z",
"done_at": "2023-09-27T09:30:04.732Z"
}
Purge all
Allows you to instantly remove all cached content from all datacenters.
posthttps://api.cdn77.com/v3/cdn/{id}/job/purge-all
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Responses
// response
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"type": "purge-all",
"cdn": {
"id": 1234567890
},
"state": "done",
"queued_at": "2023-09-27T09:30:04.732Z",
"done_at": "2023-09-27T09:30:04.732Z"
}