Query API
Execute one published Analytics API with approved filters and receive normalized rows and metadata.
The public Query API executes a saved Analytics API. It does not accept arbitrary SQL or arbitrary model fields.
https://query.reportplane.com/queryRequest
Both analytics and query are required. analytics is the Analytics API key or supported internal reference. query.filters and query.limit are optional within the published policy. A positive query.limit may request fewer rows, but it cannot raise the saved definition, destination binding, or 100,000-row server ceiling.
curl https://query.reportplane.com/query \
-H "Authorization: Bearer YOUR_QUERY_SECRET" \
-H "Content-Type: application/json" \
-d '{
"analytics": "requests_by_day",
"query": {
"filters": [
{
"field": "occurred_at",
"operator": "between",
"value": {
"from": "2026-08-01T00:00:00Z",
"to": "2026-08-02T00:00:00Z"
}
}
],
"limit": 100
}
}'
Response
{
"error": false,
"data": {
"columns": [
{ "name": "day", "type": "datetime" },
{ "name": "request_count", "type": "integer" }
],
"rows": [
{ "day": "2026-08-01T00:00:00Z", "request_count": 842 }
],
"result_metadata": {
"roles": {
"x": "day",
"y": ["request_count"]
},
"suggested_chart_types": ["line", "area", "bar", "table"]
}
}
}
Authorization sequence
The runtime authenticates the query client, validates optional identity binding, resolves the Analytics API, checks the client's allowed set, applies definition/client policy, and executes the warehouse-neutral plan.
Invalid input and query-planning errors return 400. Invalid identity returns 401. A valid identity without analytics access returns 403.