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. Describe it — one call returns its data views and every field you can query:
Use each id as an entry in metrics / dimensions, and its data_view as data_view. Add ?data_view=ACCOUNT to scope the response to one view. Three things in the response decide what you can combine:
  • data_view — a metric or dimension is only valid inside its own view. Mixing views in one query is rejected.
  • required_advanced — advanced settings the view can’t run without (a Semrush region, a Mailchimp audience). Each entry names the advanced key and the message shown when it’s missing.
  • Field flagssingle (must be the only dimension), deprecated (retired by the vendor; still resolves, may return nothing) and custom (a per-account definition, not part of the static catalog).
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.
  • POST /v1/datasources/accounts — the accounts, properties or pages a connection can be linked to.
Over MCP the same catalog is two tools — datasourcesdescribe_datasource, which returns a datasource’s data views with their metrics, dimensions and required settings in one call. Agents call them in that order, no guessing. Live values are read by configuring a saved widget (add_data_widget) and refreshing it, not by querying ad hoc.

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.