listWebsiteCmsContent
A page of goliathdata.com's CMS content of one kind, newest edit first, with each document's path and CMS edit link.
A page of goliathdata.com's CMS content of one kind, newest edit first, with each document's path and CMS edit link; null for any other organization. Edited in the CMS, not here. Org admins.
curl https://server.goliathdata.com/api/v1/call \
-H "Authorization: Bearer $GOLIATH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operationId": "listWebsiteCmsContent",
"variables": {
"collection": "ARTICLES"
}
}'import { GoliathClient } from '@goliath-data/sdk'
const goliath = new GoliathClient({
apiKey: process.env.GOLIATH_API_KEY!,
baseUrl: 'https://server.goliathdata.com',
})
// Enum values as strings: the SDK's enum types aren't exported yet, so assert to the method's variables type.
const variables = {
collection: 'ARTICLES'
} as Parameters<typeof goliath.websites.listWebsiteCmsContent>[0]
const result = await goliath.websites.listWebsiteCmsContent(variables)const res = await fetch('https://server.goliathdata.com/api/v1/call', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
operationId: 'listWebsiteCmsContent',
variables: {
collection: 'ARTICLES'
}
}),
})
const { data, errors } = await res.json()Variables
The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.
The kinds of content goliathdata.com's CMS holds.
A document's state in Goliath's CMS: its latest save, so a live one with unpublished edits is a DRAFT.
Response
What comes back under data: a list shows as one entry, and a value as its type.
{
"data": {
"websiteArticlesQuery": {
"cmsContent": {
"documents": [
{
"id": "…",
"title": "…",
"path": "…",
"date": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"published": true,
"author": "…",
"editUrl": "…"
}
],
"total": 0,
"page": 0,
"pages": 0,
"createUrl": "…"
}
}
}
}Errors
unknown_variableA variable the operation does not declare. A typo is refused rather than silently dropped.
unauthorizedNo bearer header, or the key is invalid or revoked.
insufficient_scopeThe key lacks the scope the operation requires.
forbiddenA referenced record does not exist, was deleted, or is outside your organization. The gateway cannot tell those apart.
Behaviour
A read. It rejects an Idempotency-Key header with 400 bad_request.