Skip to content
Analytics Query API

Analytics Query API

The Analytics Query API lets you run read-only SQL against your tenant’s analytics data from outside the Britive console. Submit a SELECT, poll until it finishes, then download the results as a CSV. It is the programmatic equivalent of running a query in Britive Analytics and exporting the output — suitable for scheduled extracts, compliance reporting, and feeding access data into your own warehouse or BI tool.

How It Works

Queries are asynchronous. A query is not answered by the request that submits it — you get back a query execution id, poll it until the query finishes, and receive a short-lived download URL for the results.

Two endpoints, both under your tenant URL:

MethodPathPurpose
POST/api/bizintel/analytics/querySubmit a SELECT. Returns a query_execution_id.
GET/api/bizintel/analytics/query/{query_execution_id}Poll status. Returns a CSV download URL once the query succeeds.

What This API Does Not Do

Knowing the boundaries up front saves time:

  • No schema discovery. SHOW, DESCRIBE, and EXPLAIN are rejected. Use Britive Analytics to find table and column names, then bring the finished query here.
  • Read-only. Only a single SELECT (optionally with CTEs) is accepted. Every other statement type is refused before it reaches the query engine.
  • Nothing here can alter your data. Statement checking is not the only safeguard — the data is read-only. Nothing in this API can delete or alter it.

Where to Start

Last updated on