Skip to Content
Analytics boards

Compute a saved analysis insight

Permissionboards:readAuthentication
GET
/analysis/insights/{id}/data

Evaluates the insight's current saved definition against live workspace data.

Results are never cached, and include the generation time plus the enforced row, series and cell limits. A result that exceeds a limit returns 422 analysis_result_too_large rather than a partial 200.

Narrowing a single computation

  • campaign_id pins every query in the insight to that campaign's calls. The scope is applied server-side on top of the stored configuration and cannot be expressed away by editing the insight.
  • from and to compute the insight over that window instead of its saved time range, leaving the saved definition unchanged. This is how a dashboard-wide date filter is applied.

The two compose.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Query Parameters

campaign_id?string

Restrict the computation to calls fed by this campaign.

Formatuuid
from?string

Start of a window (RFC3339, inclusive) that replaces each insight's saved time range for this request. Must be sent together with to. The saved insight is not changed.

Formatdate-time
to?string

End of the override window (RFC3339, exclusive). Must be after from and at most 400 days later. Time-grouped results are re-bucketed for the window's length — hourly up to 2 days, daily up to 92 days, weekly beyond.

Formatdate-time

Response Body

Complete computed result.

application/json
  1. response

Complete computed result. The server returns 422 instead of truncating when rows, series, or cells exceed the limits object.

group_by*AnalysisGroupBy
Value in"none""time""agent""value"
series*array<>
Itemsitems <= 50
rows*array<>
Itemsitems <= 500
stacked*boolean
generated_at*string
Formatdate-time
limits*
previous?|

The first query's value over the window immediately preceding the selected one, measured with the identical joins, filters, and aggregate. Present only for number_delta insights, and null when the range has no comparable predecessor.

Example Request
curl -X GET 'https://api.kejue.co/v1/analysis/insights/497f6eca-6276-4993-bfeb-53cbbbba6f08/data'
Example Response
{  "group_by": "none",  "series": [    "string"  ],  "rows": [    {      "x": "string",      "values": {        "property1": 0,        "property2": 0      }    }  ],  "stacked": true,  "generated_at": "2019-08-24T14:15:22Z",  "limits": {    "rows": 500,    "series": 50,    "cells": 10000  },  "previous": 0}