API reference
REST & GraphQL, fully documented.
Every endpoint with parameters, auth and examples - auto-generated from our OpenAPI spec. The interactive reference lives in the docs: this shows the layout.
Endpoints
GET/api/{pluralApiName}
Returns a paginated list of published entries. Available at /api/{pluralApiName} or /api/{singularApiName}. Supports locale, page, pageSize, sort, fields, populate, depth and filters.
// GET list - plural or singular API name
const res = await fetch(
"https://api.symcocms.com/api/{pluralApiName}?locale=en&page=1"
);
const { data, total, totalPages } = await res.json();
const res = await fetch(
"https://api.symcocms.com/api/{pluralApiName}?locale=en&page=1"
);
const { data, total, totalPages } = await res.json();
Query parameters
| Parameter | Type | Description |
|---|---|---|
locale | string | Locale code, e.g. hu. Defaults to the default locale. |
page | number | Page number (default 1). |
pageSize | number | Items per page (default 25). |
sort | string | Sort, e.g. createdAt:desc,title:asc. |
fields | string | Comma-separated fields to return. |
populate | string | Relations, components and media to expand. Use * for all. |
depth | number | Populate depth (default 1). |
filters[field][$op] | any | Filter expression - see operators below. |
logic | string | Combine filters: and (default) or or. |
Filter operators
| Operator | Meaning |
|---|---|
$eq | Equals |
$ne | Not equal |
$lt / $lte | Less than / or equal |
$gt / $gte | Greater than / or equal |
$in / $notin | In / not in a list |
$contains / $notcontains | Contains / does not contain |
$startswith / $endswith | Starts / ends with |
$null / $notnull | Is null / is not null |
$between | Between two values |
Response shape
// GET /api/{collection}?locale=en&page=1
{ "data": [
{ "id": 1, "publicId": "a1b2…", "locale": "en",
"published": true, "data": { /* your fields */ } }
],
"page": 1, "pageSize": 25, "total": 42, "totalPages": 2 }
{ "data": [
{ "id": 1, "publicId": "a1b2…", "locale": "en",
"published": true, "data": { /* your fields */ } }
],
"page": 1, "pageSize": 25, "total": 42, "totalPages": 2 }
GraphQL
Every content type is also queryable over GraphQL at POST /graphql (interactive GraphiQL at /graphiql). Query fields use the camelCase API names; collections return a connection with data and pageInfo.
# POST /graphql
query {
articles(locale: "en", page: 1, pageSize: 10) {
data { id publicId locale }
pageInfo { total page pageSize totalPages }
}
}
query {
articles(locale: "en", page: 1, pageSize: 10) {
data { id publicId locale }
pageInfo { total page pageSize totalPages }
}
}