---
title: "Get an insight"
method: GET
path: "/api/public/organizations/{orgId}/insights/{id}"
tags: ["Insights"]
---

# Get an insight

`GET /api/public/organizations/{orgId}/insights/{id}`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/insights/{id}`
- Auth: HTTP bearer

Retrieves an insight by ID, including the Markdown body, chart details, a chart image URL, and raw chart data. Requires admin access to the organization.

## Path parameters

- `orgId` string, required: Organization ID
- `id` string, required: Insight ID

## Query parameters

- `rawDataLimit` integer: Maximum raw chart rows to return (1-1000, default 1000)
- `rawDataPage` integer: Raw chart data page number

## Response `200`

Insight retrieved successfully

- PublicInsightDetailResponse
  - `data` PublicInsightDetail, required
    - `id` string, required: Insight ID
    - `organizationId` string, required: Organization ID
    - `title` string, required: Insight title
    - `chartId` string, required: Chart ID
    - `chart` object, required: Chart information
      - `id` string, required: Chart ID
      - `versionId` string, nullable, required: Latest chart version ID
      - `name` string, nullable, required: Latest chart version name
      - `type` string, nullable, required: Chart type
      - `sqlQuery` string, nullable, required: SQL query used by the chart
      - `databaseConnectionId` string, nullable, required: Data source ID used by the chart
      - `sourceQueries` object[], required: Source queries used by a multi-source chart. Empty for single-source charts.
        - `alias` string, required: Source alias used by the DuckDB join query
        - `sqlQuery` string, required: SQL query executed against this data source
        - `databaseConnectionId` string, nullable, required: Data source ID for this query. Null if the data source was deleted.
        - `position` integer, required: Source query order
      - `imageUrl` string, uri, nullable, required: URL that renders the latest chart version as a PNG image (the "Get a chart image" endpoint). Request it with the same API key authentication.
    - `createdAt` string, date-time, required: Creation timestamp
    - `updatedAt` string, date-time, required: Last update timestamp
    - `bodyMarkdown` string, required: Insight body as Markdown
    - `sourceMeta` unknown
    - `rawData` PublicInsightRawData, nullable, required: Raw data returned by the insight chart query
      - `rows` object[], required: Raw chart rows
      - `count` number, required: Total row count for the chart query
      - `page` number, required: Raw data page number
      - `limit` number, required: Maximum raw rows returned

## Other responses

- `400`: Bad request - Invalid query parameters
- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Insight not found or no admin access
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error
- `503`: Service unavailable - The insight chart data source was temporarily unreachable

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
