Skip to content

API reference

Canonical definition of ga4.sessions

GET
/v1/metrics/ga4.sessions

Returns the metric definition verbatim from the schema registry. The same object is embedded in every query result as provenance.metricDefinition, so a stored answer always carries the definition that produced it.

Read this before comparing a SignalBraid number with a number from somewhere else: ga4.sessions is the GA4 Data API sessions metric with the date dimension, in the property’s reporting timezone. It is not a reconstructed count of session_start events, and it will not match one.

The metric definition.

The canonical definition, embedded in every result.

object
id
required
string
Allowed value: ga4.sessions
version
required
integer
Allowed value: 1
providerMetric
required
string
Allowed value: sessions
dimensions
required
Array<string>
>= 1 items <= 1 items
definition
required
string
Allowed value: Sessions that began on the property, as reported by the GA4 Data API sessions metric with the date dimension. This is the provider metric, not a reconstructed session_start event count.
aggregation
required
string
Allowed value: sum
timezone
required

Dates are the property’s calendar dates, never UTC-shifted.

string
Allowed value: property
privacy
required
object
fields
required
containsUserIdentifiers
required
boolean
sourceUrl
required
string format: uri
Allowed value: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema

invalid_query — the URL carried a query delimiter, including a bare ?.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: invalid_query

unauthorized — missing, unknown, expired or revoked key.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: unauthorized
WWW-Authenticate
required
string
Allowed value: Bearer

forbidden — the key lacks the required scope, or the workspace has no plan that allows this.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: forbidden

method_not_allowed — Allow names the method this route accepts.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: method_not_allowed
Allow
required
string
Allowed value: GET

rate_limited — the key’s or its workspace’s per-plan request allowance for this route’s class is used up. It is answered after authentication, on every API-key operation in this document and on MCP, and never on /health. A download link is limited the same way, after its lookup, by the key that issued it and the export’s workspace. Retry-After is the window in seconds and RateLimit-Limit is the limit of the bucket that refused. No remaining count is returned. The limits themselves are not published here.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: rate_limited
Retry-After
required
string
/^[1-9][0-9]*$/
RateLimit-Limit
required
string
/^[1-9][0-9]*$/

auth_unavailable — the authorization store could not be reached. Used by the original REST routes; pilot operations return automation_unavailable. Retry with backoff.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: auth_unavailable