Querying & Filtering

Shape list responses with query parameters — select fields, filter, sort, paginate, and expand references.

Parameters

ParamTypeDescription
selectstringComma-separated field keys to return, e.g. select=title,slug.
filter[key]stringEquality filter on a data field, e.g. filter[category]=news.
sortstringSort by publishedAt, createdAt, updatedAt or slug. Prefix - for descending.
pagenumberPage number, starting at 1.
limitnumberItems per page (1–100, default 20).
includenumberDepth (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 LIMITinclude is capped at depth 3 to bound query cost. Only published references are expanded; unpublished ones stay as ids.
Content & Entries