POST registers the query and returns a request_id immediately; the query runs in the background; you then poll for status and fetch the results.
Endpoints
The Analytics Query APIs include the following endpoints:- Register a Behavior Query: Run a Behavior analysis.
- Register a Funnels Query: Run a Funnels analysis.
- Register a Retention Query: Run a Retention analysis.
- Register a Session-Source Query: Run a Session/Source analysis.
- Register a User Analysis Query: Run a User Property Analysis.
- Get Query Status: Check the execution status of a registered query.
- Get Query Results: Fetch the resolved results of a completed query.
Typical Workflow
Each analysis follows the same submit → poll → fetch sequence:- Submit the query by calling one of the analysis endpoints (for example, Register a Behavior Query). The response echoes the analysis
typeand returns arequest_id. - Poll Get Query Status with that
request_iduntilstatusisSUCCESSFUL(orFAILED). - Fetch Get Query Results with the same
request_idto retrieve the results. The shape of thedataarray depends on the analysis type.