Jobs

Available endpoints:
NameMethodPath
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
requiredinteger in path

ID of the CDN Resource. This is also used as the CDN Resource URL.

type
requiredstring in path

There are two types of jobs: purge: instantly removes cached content from all enabled datacenters prefetch: prepopulates newly added content to the CDN cache.

Available values:

purge
,
prefetch
,
purge-all
,

Responses

200List of jobs for CDN Resource and type.
// response
[
  {
    "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
    "type": "purge",
    "cdn": {
      "id": 1234567890
    },
    "paths_count": 100,
    "state": "done",
    "queued_at": "2021-11-26T13:56:53.457Z",
    "done_at": "2021-11-26T13:56:53.457Z"
  }
]
404CDN Resource not found.

Detail of job

Returns detailed information regarding particular data manipulation API request.

gethttps://api.cdn77.com/v3/cdn/{id}/job/{jobId}

Request parameters

id
requiredinteger in path

ID of the CDN Resource. This is also used as the CDN Resource URL.

jobId
requiredstring in path

Job ID

Responses

200Detail of the given job.
// response
{
  "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
  "type": "purge",
  "cdn": {
    "id": 1234567890
  },
  "paths": [
    "/sub/img.png"
  ],
  "paths_count": 100,
  "state": "done",
  "queued_at": "2021-11-26T13:56:53.456Z",
  "done_at": "2021-11-26T13:56:53.456Z"
}
404Job not found.

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
requiredinteger in path

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"
}
paths
array of strings

List of file paths, that are being processed in the job.

upstream_host
string

Use when host header forwarding is active on your CDN Resource.

Responses

202Job queued.
// response
{
  "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
  "type": "purge",
  "cdn": {
    "id": 1234567890
  },
  "paths": [
    "/sub/img.png"
  ],
  "paths_count": 100,
  "state": "done",
  "queued_at": "2021-11-26T13:56:53.457Z",
  "done_at": "2021-11-26T13:56:53.457Z"
}
404CDN Resource not found.

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
requiredinteger in path

ID of the CDN Resource. This is also used as the CDN Resource URL.

Request bodyrequired

// request body
{
  "paths": [
    "/sub/img.png"
  ]
}
paths
array of strings

List of file paths, that are being processed in the job.

Responses

202Job queued.
// response
{
  "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
  "type": "purge",
  "cdn": {
    "id": 1234567890
  },
  "paths": [
    "/sub/img.png"
  ],
  "paths_count": 100,
  "state": "done",
  "queued_at": "2021-11-26T13:56:53.457Z",
  "done_at": "2021-11-26T13:56:53.457Z"
}
404CDN Resource not found.

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
requiredinteger in path

ID of the CDN Resource. This is also used as the CDN Resource URL.

Responses

204Purge of all files was accepted. All cached data will be removed.
403Purge of all files is disabled.
404CDN Resource not found.