Query Builder

Discover what a service connection can query — services, views, and fields.

Helpers for discovering what a connection can query. All read-only (GET).

GET /query_builder/services

List the available services.

[ { "name": "SalesForce" }, { "name": "GoogleAnalytics4" }, { "name": "HubSpot3" }, { "name": "FacebookAds" } ]

Service names are PascalCase, not a fixed lowercase/underscore convention — use the name returned here verbatim as :serviceName below rather than guessing at a service's name.

GET /query_builder/services/:serviceName/views?connectionId=<id>

List the views available for a connection under a service. connectionId is a required query parameter.

[ { "name": "orders", "description": "All orders", "type": "TABLE" } ]

A view is identified by its name, which is what :viewName below takes.

GET /query_builder/services/:serviceName/views/:viewName/fields?connectionId=<id>

List the fields of a view. connectionId is a required query parameter.

[
  { "name": "order_id", "description": "Order identifier", "dataType": "string", "type": "dimension", "timeless": true },
  { "name": "amount", "description": "Order total", "dataType": "double", "type": "metric", "timeless": false }
]

A field is identified by its name too — that is the value to use in query.fields[].name when generating a data feed (see Data Feeds). A query may only name fields this endpoint reports for the view it reads; anything else returns 400 rather than a feed with an empty column, so read this before writing a query rather than guessing at a name.


Did this page help you?