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

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": [
      "/sub/img.png"
    ],
    "ignored_paths": [
      "/sub/img.png/*"
    ],
    "paths_count": 100,
    "state": "done",
    "queued_at": "2024-07-16T13:43:29.318Z",
    "done_at": "2024-07-16T13:43:29.318Z"
  }
]

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
jobIdrequiredstring in path, format UUIDv4

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-07-16T13:43:29.317Z",
  "done_at": "2024-07-16T13:43:29.317Z"
}

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

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": "purge",
  "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-07-16T13:43:29.318Z",
  "done_at": "2024-07-16T13:43:29.318Z"
}

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

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-07-16T13:43:29.318Z",
  "done_at": "2024-07-16T13:43:29.318Z"
}

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

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",
  "cdn": {
    "id": 1234567890
  },
  "state": "done",
  "queued_at": "2024-07-16T13:43:29.318Z",
  "done_at": "2024-07-16T13:43:29.318Z"
}

403Purge of all files is disabled.

404CDN Resource not found.