/api/v2/metrics. It uses service-account credentials, resource permissions, and operation-specific scopes to manage connected marketing data and reusable reporting workflows.
Use a service-account credential
A regular visibility credential is not sufficient. Associate the credential with a service account and grant the scopes required by the operations your integration uses. Common scopes includemetrics:read, metrics:write, metrics:execute, and metrics:webhooks; individual operations define their requirements.
Source access, resource visibility, and workspace network restrictions still apply. A scope grants a capability, not unrestricted access to every connection or private resource.
Discover available connections and fields
Use the connector and connection endpoints to identify available sources and the accounts the service account can access. Use catalogue information to build a query against the actual fields exposed by those accounts.Work with versions
Queries and other configurable resources separate their identity from their versioned definition. Create a draft, inspect validation results, and publish the intended version before using it in a production integration. Service-account-created queries require workspace visibility. Follow each operation’s idempotency and version-precondition requirements. Use operations and webhooks to observe accepted work and retrieve results. Use pagination for collections; the Data API returns a top-levelnextCursor.