Querying & Filtering
Shape list responses with query parameters — select fields, filter, sort, paginate, and expand references.
Parameters
| Param | Type | Description |
|---|---|---|
| select | string | Comma-separated field keys to return, e.g. select=title,slug. |
| filter[key] | string | Equality filter on a data field, e.g. filter[category]=news. |
| sort | string | Sort by publishedAt, createdAt, updatedAt or slug. Prefix - for descending. |
| page | number | Page number, starting at 1. |
| limit | number | Items per page (1–100, default 20). |
| include | number | Depth (0–3) to expand reference fields into nested entries. |
Examples
Latest 5 posts, only the title and slug:
bash
curl "https://api.wriven.com/v1/projects/PROJECT_ID/content/blog_post?\
select=title,slug&sort=-publishedAt&limit=5" \
-H "Authorization: Bearer wrk_live_xxx"Posts in a category:
bash
curl "https://api.wriven.com/v1/projects/PROJECT_ID/content/blog_post?\
filter[category]=news" \
-H "Authorization: Bearer wrk_live_xxx"Expanding references
Fields of type reference store the id of another entry. By default the id is returned as-is. Pass include to replace it with the referenced entry inline:
bash
curl "https://api.wriven.com/v1/projects/PROJECT_ID/content/blog_post/hello-world?\
include=1" \
-H "Authorization: Bearer wrk_live_xxx"// DEPTH LIMIT
Content & Entriesinclude is capped at depth 3 to bound query cost. Only published references are expanded; unpublished ones stay as ids.