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

idrequiredinteger in path

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

typerequiredstring in path

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

200List of jobs for CDN Resource and type.

// example of the response
[
  {
    "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
    "type": "purge",
    "cdn": {
      "id": 1234567890
    },
    "paths_count": 100,
    "state": "done",
    "queued_at": "2024-02-29T14:23:55.093Z",
    "done_at": "2024-02-29T14:23:55.093Z"
  }
]

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

idrequiredinteger in path

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

jobIdrequiredstring in path

Job ID

Responses

200Detail of the given job.

// example of the 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": "2024-02-29T14:23:55.090Z",
  "done_at": "2024-02-29T14:23:55.091Z"
}

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

idrequiredinteger in path

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

Request bodyrequired

// example of the request body
{
  "paths": [
    "/sub/img.png"
  ],
  "upstream_host": "your-domain.com"
}
pathsarray of strings

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

upstream_hoststring

Is required when host header forwarding is active on your CDN Resource.

Responses

202Job queued.

// example of the 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": "2024-02-29T14:23:55.096Z",
  "done_at": "2024-02-29T14:23:55.096Z"
}

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

idrequiredinteger in path

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

Request bodyrequired

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

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

Responses

202Job queued.

// example of the 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": "2024-02-29T14:23:55.097Z",
  "done_at": "2024-02-29T14:23:55.097Z"
}

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

idrequiredinteger in path

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

Responses

202Purge of all files was accepted. All cached data will be removed.

// example of the response
{
  "id": "9880280c-0507-46d1-88f3-71cfee83fa57",
  "type": "purge-all",
  "cdn": {
    "id": 1234567890
  },
  "state": "done",
  "queued_at": "2024-02-29T14:23:55.094Z",
  "done_at": "2024-02-29T14:23:55.094Z"
}

403Purge of all files is disabled.

404CDN Resource not found.