INVALID_GROUP_BY_PATH — groupBy entry is not a scalar JSONPath
cyoda-go version 0.8.4
errors.INVALID_GROUP_BY_PATH
Section titled “errors.INVALID_GROUP_BY_PATH”INVALID_GROUP_BY_PATH — a groupBy entry is neither the reserved state token nor a JSONPath that denotes a single scalar.
SYNOPSIS
Section titled “SYNOPSIS”HTTP: 400 Bad Request. Retryable: no.
DESCRIPTION
Section titled “DESCRIPTION”Raised by POST /api/entity/stats/{entityName}/{modelVersion}/query. Every groupBy entry other than state must match the wire JSONPath grammar — a required $. leader followed by dot-separated segments of ASCII letters, digits, _ and -:
path = "$." segment ( "." segment )*segment = 1*( ALPHA / DIGIT / "_" / "-" )Rejected here: a missing leader (country — write $.country), bracket-quoted property access ($['country'], $.['country']), array projections and subscripts ($.items[*], $.items[0] — address a position as an ordinary segment, $.items.0), recursive descent ($..name), filter expressions, empty, leading, trailing or doubled dots, whitespace, quotes, and non-ASCII characters.
Array subscripts are rejected even though a condition jsonPath accepts them: a group-by dimension must resolve to one scalar, and a projection has no such value. The check runs at the API boundary before any storage backend, so a request is rejected identically whichever execution path would have served it. The message names the offending entry and the reason.
The token state is accepted in groupBy only, and carries no $. leader — it names lifecycle state, not a path. A payload field literally called state is written $.state.
SEE ALSO
Section titled “SEE ALSO”- errors
- crud
- errors.INVALID_AGGREGATION_FIELD
- errors.INVALID_FIELD_PATH
See also
Section titled “See also”cyoda help errors— Every error response from the Cyoda REST API carries a structurederrorCodein thepropertiesobject. Multiple codes may share the same HTTP status. Programmatic handling keys onerrorCode, not HTTP status.cyoda help crud— Entities are instances of models. Each entity has a UUID, a model reference (entityName,modelVersion), and a lifecycle state managed by the workflow engine. Creating an entity requires the referenced model to be inLOCKEDstate. All write operations run within a Cyoda transaction and return atransactionIdalongside the affected entity IDs.cyoda help errors INVALID_AGGREGATION_FIELD— Raised byPOST /api/entity/stats/{entityName}/{modelVersion}/query. An aggregationfieldobeys exactly the grammar agroupBypath does — a required$.leader followed by dot-separated segments of ASCII letters, digits,_and-, with no bracket-quoted access, array subscript or projection, recursive descent, whitespace or non-ASCII character. Seecyoda help errors INVALID_GROUP_BY_PATHfor the grammar and the rejected spellings; the message names the offending field and the reason.cyoda help errors INVALID_FIELD_PATH— Three checks emit this code.
Raw formats
Section titled “Raw formats”/help/errors/invalid_group_by_path.json— full descriptor (matchesGET /help/{topic}envelope)/help/errors/invalid_group_by_path.md— body only