---
title: "Run Insight"
method: POST
path: "/reporting/insight/{id}/run"
tags: ["Insight"]
---

# Run Insight

`POST /reporting/insight/{id}/run`

## Path parameters

- `id` string, uuid, required

## Request body

- InsightRunDTO
  - `formatPlan` InsightRunFormatPlan
    - `format` 'raw' | 'recharts' — This is the format of the data to return. If not provided, defaults to "raw". Raw provides the data as fetched from the database, with formulas evaluated. Recharts provides the data in a format that can is ready to be used by recharts.js to render charts.
  - `timeRangeOverride` InsightTimeRangeWithStep
    - `step` 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' — This is the group by step for aggregation. If not provided, defaults to group by day.
    - `start` object — This is the start date for the time range. Should be a valid ISO 8601 date-time string or relative time string. If not provided, defaults to the 7 days ago. Relative time strings of the format "-{number}{unit}" are allowed. Valid units are: - d: days - h: hours - w: weeks - m: months - y: years
    - `end` object — This is the end date for the time range. Should be a valid ISO 8601 date-time string or relative time string. If not provided, defaults to now. Relative time strings of the format "-{number}{unit}" are allowed. Valid units are: - d: days - h: hours - w: weeks - m: months - y: years
    - `timezone` string — This is the timezone you want to set for the query. If not provided, defaults to UTC.
  - `assistantId` string — Optional runtime assistant scope for dashboards. This is applied to call-table queries without mutating the saved insight.

## Response `200`

- InsightRunResponse
  - `id` string, required
  - `insightId` string, required
  - `orgId` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `201`

---

[API](https://skmtc.net/vapiai/apis/vapi-api.md) · [All operations](https://skmtc.net/vapiai/apis/vapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vapiai/vapi-api/versions/42e311e78e21/schema)
