Purge and prefetch
Purge cached URLs or directories, and prefetch given URLs.
cache-jobsCacheAuthentication: User (some parameters admin only)3 endpointsList purge/prefetch jobs
GET
/api/v2/cache-jobsAuthentication: User (some parameters admin only)
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1 |
| page_size | integer | — | Items per page |
| sort | string | — | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
| tenant_id | integer | — | Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data |
| type | string | — | Only list jobs of this type. |
| url | string | — | If it starts with http:// or https://, exact match on the full URL, normalized as on submission (the job's URL list contains it); otherwise exact match on the host name. |
Create purge/prefetch job
POST
/api/v2/cache-jobsAuthentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Required | purge_url = purge URLs; purge_dir = purge directories (URL ends with /); prefetch = prefetch. |
| urls | string[] | Required | http(s)://host/path (normalized, see create); at most 100 entries per prefetch. |
Get purge/prefetch job
GET
/api/v2/cache-jobs/{id}Authentication: User (some parameters admin only)
Purge and prefetch object
| Field | Type | Required | Description |
|---|---|---|---|
| created_at | string | — | Created at |
| id | integer | — | Record ID |
| results | CacheJobNodeResult[] | — | Execution result of each node (returned in details only). |
| site_id | integer | — | Site ID |
| status | string | — | Status of the push task (if some nodes fail it stays pending and retries with backoff, then becomes failed when retries run out). |
| tenant_id | integer | — | Owner tenant (user) ID |
| type | string | — | purge_url = purge URLs; purge_dir = purge directories (URL ends with /); prefetch = prefetch. |
| updated_at | string | — | Updated at |
| urls | string[] | — | http(s)://host/path (normalized, see create); at most 100 entries per prefetch. |