{
  "topic": "errors.INVALID_AGGREGATION_FIELD",
  "path": [
    "errors",
    "INVALID_AGGREGATION_FIELD"
  ],
  "title": "INVALID_AGGREGATION_FIELD — aggregation field is not a scalar JSONPath",
  "synopsis": "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.",
  "body": "# errors.INVALID_AGGREGATION_FIELD\n\n## NAME\n\nINVALID_AGGREGATION_FIELD — an aggregation's `field` is not a JSONPath that denotes a single scalar.\n\n## SYNOPSIS\n\nHTTP: `400` `Bad Request`. Retryable: `no`.\n\n## DESCRIPTION\n\nRaised 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.\n\nThe 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.\n\nA 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`.\n\n## SEE ALSO\n\n- errors\n- crud\n- errors.INVALID_GROUP_BY_PATH\n- errors.INVALID_AGGREGATION_OP\n",
  "sections": [
    {
      "name": "NAME",
      "body": "INVALID_AGGREGATION_FIELD — an aggregation's `field` is not a JSONPath that denotes a single scalar."
    },
    {
      "name": "SYNOPSIS",
      "body": "HTTP: `400` `Bad Request`. Retryable: `no`."
    },
    {
      "name": "DESCRIPTION",
      "body": "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.\n\nThe 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.\n\nA 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`."
    },
    {
      "name": "SEE ALSO",
      "body": "- errors\n- crud\n- errors.INVALID_GROUP_BY_PATH\n- errors.INVALID_AGGREGATION_OP"
    }
  ],
  "see_also": [
    "errors",
    "crud",
    "errors.INVALID_GROUP_BY_PATH",
    "errors.INVALID_AGGREGATION_OP"
  ],
  "stability": "stable",
  "actions": []
}
