GraphQL
REST lists answer everything at once. For paging and filtering, CMS, PIM, Ecommerce and Directory also have a read-only GraphQL endpoint.
Endpoints
Section titled “Endpoints”| Service | Endpoint |
|---|---|
| CMS | POST https://api.nimles.com/cms/graphql |
| PIM | POST https://api.nimles.com/pim/graphql |
| Ecommerce | POST https://api.nimles.com/e-commerce/graphql |
| Directory | POST https://api.nimles.com/directory/graphql |
Send the same bearer token as for REST, and name the tenant in a TenantId header (or a tenantId query
parameter): the GraphQL URL has no tenant in its path.
curl -s https://api.nimles.com/cms/graphql \ -H "Authorization: Bearer $NIMLES_TOKEN" \ -H "TenantId: $NIMLES_TENANT_ID" \ -H "Content-Type: application/json" \ -d '{"query":"{ pages(first: 10) { totalCount nodes { id title uniqueName } } }"}'Every field checks the same actions as REST: reading published content needs the type’s read action, drafts its
write action.
Paging
Section titled “Paging”Lists are cursor connections:
firstandafterpage forwards,lastandbeforebackwards.- A page has at most 100 items, and 100 when you do not ask. Asking for more is an error
(
The maximum allowed items per page were exceeded.). totalCountis the number of matching items;pageInfohashasNextPage,hasPreviousPage,startCursorandendCursor;nodesare the items (edgestoo, with acursoreach).
Example: CMS pages
Section titled “Example: CMS pages”query Pages($first: Int, $after: String) { pages(first: $first, after: $after, version: DRAFT) { totalCount pageInfo { hasNextPage endCursor } nodes { id title uniqueName pageType status lastModified } }}{ "first": 20 }The answer:
{ "data": { "pages": { "totalCount": 1, "pageInfo": { "hasNextPage": false, "endCursor": "MA==" }, "nodes": [ { "id": "bf8a927c-96dc-43ad-8195-4331246bbde1", "title": "Hello, Nimles", "uniqueName": "hello-nimles", "pageType": "Page", "status": "Draft", "lastModified": "2026-10-26T03:41:53.412Z" } ] } }}For the next page, send after with the last endCursor while hasNextPage is true.
- Versions. Publishable content (CMS pages, posts, layouts and themes; PIM products and product groups; Directory
profiles and categories) takes
version:PUBLISHED(the default) answers the published version of published items only,DRAFTthe current version of every item. A new page is a draft, so it only shows withversion: DRAFT. - Filters.
pagesalso takesids,uniqueName,pageTypeandmodifiedSince. One page by id or unique name:page(uniqueName: "hello-nimles") { id title }. - JSON members. Free-form members such as a page’s
elementsandstylescome back as one JSON value; you do not select inside them.
The schemas
Section titled “The schemas”| Service | Lists (paged) | Single items |
|---|---|---|
| CMS | pages, posts, layouts, themes |
page, post |
| PIM | products, productGroups, productProperties |
product, productGroup |
| Ecommerce | pricelists, productStocks |
pricelist |
| Directory | profiles, categories |
profile, category |
The fields of each type are the members of the REST model with the same name (see the API reference).
Introspection is off in production, so GraphQL tools cannot load the schema from the endpoint: write queries from the REST models and the arguments above. A selection may be at most 12 levels deep.