INVALID_AGGREGATION_FIELD — aggregation field is not a scalar JSONPath
cyoda-go version 0.8.4
errors.INVALID_AGGREGATION_FIELD
Section titled “errors.INVALID_AGGREGATION_FIELD”INVALID_AGGREGATION_FIELD — an aggregation’s field is not 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. An aggregation field obeys exactly the grammar a groupBy path 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. See cyoda help errors INVALID_GROUP_BY_PATH for the grammar and the rejected spellings; the message names the offending field and the reason.
The reserved token state is groupBy-only. There is no defined aggregate over lifecycle state, so state as an aggregation field is just an identifier missing its $. leader and is rejected here.
A well-formed path whose value is absent or non-numeric at runtime is not an error: those entities are skipped for that aggregation, and a bucket with no numeric samples reports null.
SEE ALSO
Section titled “SEE ALSO”- errors
- crud
- errors.INVALID_GROUP_BY_PATH
- errors.INVALID_AGGREGATION_OP
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_GROUP_BY_PATH— Raised byPOST /api/entity/stats/{entityName}/{modelVersion}/query. EverygroupByentry other thanstatemust match the wire JSONPath grammar — a required$.leader followed by dot-separated segments of ASCII letters, digits,_and-:cyoda help errors INVALID_AGGREGATION_OP— Raised byPOST /api/entity/stats/{entityName}/{modelVersion}/query. The supported operators aresum,avg,min,maxandstdev, spelled lowercase. Anything else — includingcount, an uppercase spelling, or a typo — is rejected, and the message echoes the value that was sent.
Raw formats
Section titled “Raw formats”/help/errors/invalid_aggregation_field.json— full descriptor (matchesGET /help/{topic}envelope)/help/errors/invalid_aggregation_field.md— body only