Skip to content

GraphQL

REST lists answer everything at once. For paging and filtering, CMS, PIM, Ecommerce and Directory also have a read-only GraphQL endpoint.

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.

Terminal window
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.

Lists are cursor connections:

  • first and after page forwards, last and before backwards.
  • 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.).
  • totalCount is the number of matching items; pageInfo has hasNextPage, hasPreviousPage, startCursor and endCursor; nodes are the items (edges too, with a cursor each).
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, DRAFT the current version of every item. A new page is a draft, so it only shows with version: DRAFT.
  • Filters. pages also takes ids, uniqueName, pageType and modifiedSince. One page by id or unique name: page(uniqueName: "hello-nimles") { id title }.
  • JSON members. Free-form members such as a page’s elements and styles come back as one JSON value; you do not select inside them.
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.