Skip to main content
POST /v1/data/query returns live metric values from one of a client’s connected data sources. It’s the same call that powers every chart and KPI widget in the app, exposed for your own automations.
This endpoint proxies to Oviond’s datasource service. It reads a data source the client has already connected in the app — it does not create or authorize connections. Connect a source in the project editor first.

Request

Response

  • data.current — the rows for the current range (one per dimensions bucket, keyed by your metric and dimension identifiers).
  • data.currentSummary — the totals across the current range.
  • data.previous / data.previousSummary — the same for the comparison period, when you pass previous_start / previous_end (empty otherwise).
  • data.stateACTIVE when the connection returned data.
Read fields by the identifiers you requested rather than by position; the exact keys vary by datasource and data_view.

Finding valid identifiers

The valid datasource_id, metrics, dimensions, and data_view values are all discoverable — you never have to guess. Walk the field catalog: 1. Find the datasource_id — list every datasource Oviond supports:
2. List its metrics and dimensions — the ids you pass to the query:
Each returns a flat, scannable list — every field carries its id, name, data_view, and group:
Add ?data_view=ACCOUNT to filter to one view. Use each id as an entry in metrics / dimensions, and its data_view as data_view. Other helpful endpoints:
  • GET /v1/clients/{id}/datasources — which sources a specific client has connected.
  • POST /v1/data/resource — selectable sub-resource values (campaigns, ad sets, videos) for filters.
Over MCP the same catalog is available as tools — data_list_datasourcesdata_list_metrics / data_list_dimensionsdata_query. Agents call them in that order, no guessing.

Common errors

A 502 most often means the client’s OAuth token for that datasource has expired and needs reconnecting in the app — it’s not a bug in your request.