DashboardsAdd insight to dashboard

Add insight to dashboard

Place an insight on a dashboard with an optional grid layout. Both the dashboard and the insight must belong to the resolved location. Requires an agency key (ak_). Returns the created link row.

curl -X POST "https://mythic-analytics.gulp.workers.dev/builder/dashboards/123e4567-e89b-12d3-a456-426614174000/insights?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "insight_id": "123e4567-e89b-12d3-a456-426614174000",
  "layout": {
    "lg": {
      "x": 0,
      "y": 0,
      "w": 6,
      "h": 4
    },
    "md": {
      "x": 0,
      "y": 0,
      "w": 6,
      "h": 4
    },
    "sm": {
      "x": 0,
      "y": 0,
      "w": 6,
      "h": 4
    }
  }
}'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "dashboard_id": "123e4567-e89b-12d3-a456-426614174000",
    "insight_id": "123e4567-e89b-12d3-a456-426614174000",
    "layout": {
      "lg": {
        "x": 0,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "md": {
        "x": 0,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "sm": {
        "x": 0,
        "y": 0,
        "w": 6,
        "h": 4
      }
    },
    "overrides": {},
    "created_at": "2024-12-25T10:00:00Z",
    "insight": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "John Doe",
      "insight_type": "number"
    }
  }
}
POST
/dashboards/{id}/insights
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need dashboards:read or dashboards:write. See Using an mcp_ key over HTTP.

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need dashboards:read or dashboards:write. See Using an mcp_ key over HTTP.
path
idstring
Required

Dashboard UUID.

Format: uuid
query
location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Content-Typestring
Required

The media type of the request body

Options: application/json
layoutobject

Responsive grid position keyed by breakpoint. Each breakpoint holds x, y, w, h (grid columns/rows).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need dashboards:read or dashboards:write. See Using an mcp_ key over HTTP.

Path Parameters

idstring
Required

Dashboard UUID.

Query Parameters

location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Example:
acme-retail

Body

application/json
layoutobject

Responsive grid position keyed by breakpoint. Each breakpoint holds x, y, w, h (grid columns/rows).

Responses

dataobject