Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Query Chart Series Data

POST/api/v2/charts/series

Retrieves time series data based on configured series parameters

Authorizations

  • AuthorizationBearer API Keyheaderrequired
    `Authorization: Bearer <token>`

Request bodyJSON

  • seriesarray ofobjectrequired

    Array of series configurations

    8 properties
    • sourceIdstringrequired

      ID of the data source for this series

      Example: "65f5e4a3b9e77c001a123456"
    • aggFnavgorcountorcount_distinctorlast_valueormaxormin+2 morerequired

      Aggregation function to use on the data

      Example: "count"
    • wherestringrequired

      Filter condition in Lucene query syntax

      Example: "service:api AND level:error"
    • groupByarray ofstringrequired

      Fields to group the results by

      Example: ["service","host"]
    • fieldoptionalstring

      Field to aggregate

      Example: "duration"
    • whereLanguageoptionalluceneorsql

      Query language used in the where clause

      Example: "lucene"
    • metricNameoptionalstring

      Name of the metric (for metric data sources)

      Example: "http_requests_total"
    • metricDataTypeoptionalsumorgaugeorhistogram

      Type of metric data

      Example: "gauge"
  • startTimenumberrequired

    Start timestamp in milliseconds

    Example: 1647014400000
  • endTimenumberrequired

    End timestamp in milliseconds

    Example: 1647100800000
  • granularityoptional30sor1mor5mor10mor15mor30m+9 more

    Time bucket size for aggregations

    Example: "1h"
  • seriesReturnTypeoptionalratioorcolumn

    Format of the returned data

    Example: "column"

Response

JSON

200

Successfully retrieved time series data

JSON
  • dataoptionalarray ofobject

    Array of data points for the series

    4 properties
    • ts_bucketoptionalnumber

      Timestamp of the data point (bucket start time)

      Example: 1647014400000
    • dataoptionalnumber

      Value for the first series

      Example: 42
    • dataoptionalnumber

      Value for the second series

      Example: 18
    • groupoptionalarray ofstring

      Group by values if groupBy was specified

      Example: ["api","prod-host-1"]
Navigation