Cache groups
A set of cache rules that many sites can reference; either platform groups or tenant-owned groups.
cache-groupsCacheAuthentication: User (some parameters admin only)7 endpointsList cache groups
GET
/api/v2/cache-groupsAuthentication: 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 |
Create cache group
POST
/api/v2/cache-groupsAuthentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| cache | CacheConfig | — | Cache rules, same as the cache field ({rules, ignore_params}) of the node contract schema/site.json; validated by the server against the contract. |
| des | string | — | Description |
| from_site_id | integer | — | Save from a site (rules are taken from the site's current effective value; cache is ignored). |
| is_default | boolean | — | Platform default group (exactly one). |
| name | string | Required | Name |
| sort | integer | — | Display order (smaller first). |
| switch_site | boolean | — | After saving, make the site reference the new group. |
Get cache group
GET
/api/v2/cache-groups/{id}Authentication: User (some parameters admin only)
Update cache group
PUT
/api/v2/cache-groups/{id}Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| cache | CacheConfig | — | Cache rules, same as the cache field ({rules, ignore_params}) of the node contract schema/site.json; validated by the server against the contract. |
| des | string | — | Description |
| name | string | — | Name |
| sort | integer | — | Display order (smaller first). |
Delete cache group
DELETE
/api/v2/cache-groups/{id}Authentication: User (some parameters admin only)
Copy cache group
POST
/api/v2/cache-groups/{id}/copyAuthentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| des | string | — | Description |
| name | string | Required | Name |
| sort | integer | — | Display order (smaller first). |
Set as platform default group
POST
/api/v2/cache-groups/{id}/set-defaultAuthentication: Admin only
Cache groups object
| Field | Type | Required | Description |
|---|---|---|---|
| cache | CacheConfig | — | Cache rules, same as the cache field ({rules, ignore_params}) of the node contract schema/site.json; validated by the server against the contract. |
| created_at | string | — | Created at |
| des | string | — | Description |
| from_site_id | integer | — | Save from a site (rules are taken from the site's current effective value; cache is ignored). |
| id | integer | — | Record ID |
| is_default | boolean | — | Platform default group (exactly one). |
| name | string | — | Name |
| site_count | integer | — | Number of sites that reference it explicitly (tenant callers only count their own). |
| sort | integer | — | Display order (smaller first). |
| switch_site | boolean | — | After saving, make the site reference the new group. |
| tenant_id | integer | — | Owning tenant; null = platform group. |
| updated_at | string | — | Updated at |