POST/ng-cms/graphqlsmart_toyAgentic spec

GraphQL entries query

A single GraphQL endpoint (POST /ng-cms/graphql) exposing one read-only query, entries, that lists content entries for a project/content type. It returns the same data as the REST content-entries list endpoint - filtering, sorting, pagination, and reference/media resolution all behave identically for equivalent inputs.

Параметры запроса

x-api-keystring
Обязательный

API key header. Required on every request, same as the REST endpoints.

x-bucket-idstring
Обязательный

Project/bucket ID header. Unlike REST content-entries endpoints, this GraphQL endpoint has no {projectId} route segment, so the bucket is resolved exclusively from this header - it must always be sent.

projectIdstring
Обязательный

GraphQL argument on the entries query. Selects which project's entries to query - independent of the x-bucket-id header (which drives auth/plan/rate-limit validation only), but normally set to the same value.

typeKeystring
Обязательный

Content type key or ID whose entries to list, e.g. "post".

statusCmsEntryStatus
Необязательный

Filter by entry status: DRAFT, PUBLISHED, or ARCHIVED. Omit to return entries in any status.

searchstring
Необязательный

Free-text search across entry fields.

fieldFilters[FieldFilterInput!]
Необязательный

List of exact-match field filters, e.g. [{ key: "slug", value: "my-post" }].

excludeIds[String!]
Необязательный

Entry IDs to exclude from the results.

offsetnumberпо умолчанию: 0
Необязательный

Pagination offset (0-based).

limitnumberпо умолчанию: 50
Необязательный

Max entries to return. Must be between 1 and 1000.

sortBystringпо умолчанию: "created_at"
Необязательный

Sort field. Allowed: created_at, updated_at, published_at.

sortDirstringпо умолчанию: "desc"
Необязательный

Sort direction. Allowed: asc, desc.

langstring
Необязательный

Filter by entry language code.

Тело запроса

GraphQL request body
querystring
Обязательный

The GraphQL document to execute, e.g. "{ entries(projectId: \"...\", typeKey: \"post\") { total items { id } } }".

variablesobject
Необязательный

Optional variables object if the query uses GraphQL variables instead of inline literals.

FieldFilterInput
keystring
Обязательный

Field key to filter on, e.g. "slug".

valuestring
Обязательный

Exact value to match.

Ответы

200GraphQL responses always return HTTP 200, whether the query succeeded or failed at the GraphQL level (unknown typeKey, invalid limit/sortBy, etc.). Check the top-level errors array to distinguish success from failure - HTTP status codes below 200 only occur for authentication/access-control failures, which are rejected before the query runs.

тип: GraphQLResponse

dataobjectPresent when the query executed without errors. Contains an entries field shaped as CmsEntryConnection.
entriesCmsEntryConnection
errorsGraphQLError[]Present when the query failed. One entry per error.
messagestringHuman-readable error message, e.g. "Unknown typeKey 'x' for project 'y'.", "limit must be between 1 and 1000.", "Invalid sortBy value. Allowed: created_at, updated_at, published_at."
401Missing or invalid x-api-key header.
403Missing projectId/bucketId - neither a route value nor the x-bucket-id header was provided.
412Precondition Failed. Project's plan doesn't allow access to the requested resource.
429Rate limit exceeded for the bucket.

Оставаясь на сайте, Вы даете свое согласие на использование файлов cookie