QueryChart

POST/analytics/v1/dashboard/chart-query

Request Body

required
application/json
{
  "$ref": "#/components/schemas/analytics.v1.ChartQueryRequest",
  "$ref-value": {
    "type": "object",
    "properties": {
      "dataset": {
        "type": "string",
        "examples": [
          "content_views"
        ],
        "title": "dataset"
      },
      "metric": {
        "type": "string",
        "examples": [
          "unique_users"
        ],
        "title": "metric"
      },
      "group_by": {
        "type": "array",
        "examples": [
          [
            "country"
          ]
        ],
        "items": {
          "type": "string",
          "examples": [
            [
              "country"
            ]
          ]
        },
        "title": "group_by"
      },
      "filters": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/analytics.v1.ChartFilter",
          "$ref-value": {
            "type": "object",
            "properties": {
              "field": {
                "type": "string",
                "examples": [
                  "country"
                ],
                "title": "field"
              },
              "operator": {
                "type": "string",
                "examples": [
                  "eq"
                ],
                "title": "operator",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "in",
                  "not_in",
                  "contains",
                  "not_contains",
                  "starts_with",
                  "ends_with",
                  "between",
                  "is_empty",
                  "is_not_empty"
                ]
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "title": "values"
              }
            },
            "title": "ChartFilter",
            "required": [
              "field"
            ],
            "additionalProperties": false
          }
        },
        "title": "filters"
      },
      "time_start": {
        "type": "string",
        "examples": [
          "2026-01-15T10:30:00Z"
        ],
        "title": "time_start"
      },
      "time_end": {
        "type": "string",
        "examples": [
          "2026-01-15T10:30:00Z"
        ],
        "title": "time_end"
      },
      "interval": {
        "type": "string",
        "examples": [
          "1h"
        ],
        "title": "interval"
      },
      "limit": {
        "type": "integer",
        "examples": [
          "100"
        ],
        "title": "limit",
        "format": "int32"
      }
    },
    "title": "ChartQueryRequest",
    "required": [
      "dataset",
      "metric",
      "time_start",
      "time_end"
    ],
    "additionalProperties": false
  }
}

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/analytics.v1.ChartQueryResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "rows": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/analytics.v1.ChartRow",
          "$ref-value": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "string",
                "examples": [
                  "2026-01-15T10:30:00Z"
                ],
                "title": "timestamp"
              },
              "dimensions": {
                "type": "object",
                "title": "dimensions",
                "additionalProperties": {
                  "type": "string",
                  "title": "value"
                }
              },
              "value": {
                "type": "number",
                "examples": [
                  "1250"
                ],
                "title": "value",
                "format": "double"
              }
            },
            "title": "ChartRow",
            "additionalProperties": false
          }
        },
        "title": "rows"
      }
    },
    "title": "ChartQueryResponse",
    "additionalProperties": false
  }
}
curl -X POST "https://api.rixl.com/analytics/v1/dashboard/chart-query" \
  -H "Content-Type: application/json" \
  -d '{
    "dataset": "content_views",
    "metric": "unique_users",
    "time_start": "2026-01-15T10:30:00Z",
    "time_end": "2026-01-15T10:30:00Z"
  }'

Success

application/json

{
  "$ref": "#/components/schemas/analytics.v1.ChartQueryResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "rows": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/analytics.v1.ChartRow",
          "$ref-value": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "string",
                "examples": [
                  "2026-01-15T10:30:00Z"
                ],
                "title": "timestamp"
              },
              "dimensions": {
                "type": "object",
                "title": "dimensions",
                "additionalProperties": {
                  "type": "string",
                  "title": "value"
                }
              },
              "value": {
                "type": "number",
                "examples": [
                  "1250"
                ],
                "title": "value",
                "format": "double"
              }
            },
            "title": "ChartRow",
            "additionalProperties": false
          }
        },
        "title": "rows"
      }
    },
    "title": "ChartQueryResponse",
    "additionalProperties": false
  }
}