Retrieve Dashboard

Retrieve a complete dashboard with all chart blocks and card data for client-side rendering.

GET /api/dashboard/{id}/

Fetches the full dashboard data including all chart blocks (cards) that can be rendered on your own platform. This endpoint returns the same structure as the regular dashboard retrieve endpoint and supports API key authentication.

Headers

Authorization: Bearer alloy_<your_key>

Path Parameters

Parameter
Type
Description

id

string (UUID)

The dashboard ID returned from the POST /api/dashboard/generate/ response

Example Request

curl -X GET https://api.pickalloy.com/api/dashboard/d6ad65c0-1234-5678-9abc-def012345678/ \
  -H "Authorization: Bearer alloy_yourapikey"

Sample Response

{
  "status": "success",
  "success": true,
  "message": "Dashboard retrieved successfully",
  "data": {
    "id": "d6ad65c0-1234-5678-9abc-def012345678",
    "title": "Q3 Sales Overview",
    "description": "Executive dashboard showing revenue trends",
    "layout": {
      "visualizations": [],
      "chart_order": [0, 1, 2],
      "color_scheme": {
        "primary": "#3B82F6",
        "secondary": "#10B981",
        "accent": "#F5A623"
      },
      "narrative_snippets": [
        "Revenue increased 23% compared to last quarter",
        "Top performing region is West with $450K in sales"
      ]
    },
    "chart_blocks": [
      {
        "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
        "dashboard": "d6ad65c0-1234-5678-9abc-def012345678",
        "position": 0,
        "type": "kpi",
        "title": "Total Revenue",
        "description": "Sum of all revenue",
        "spec": {
          "value": 1250000,
          "value_from_column": "revenue",
          "operation": "sum",
          "unit": "$",
          "trend": "+12% vs last month",
          "target": 1000000
        },
        "data_preview": {
          "columns": ["label", "value"],
          "rows": [
            {"label": "Total Revenue", "value": 1250000}
          ]
        },
        "config": {},
        "created_at": "2025-01-08T10:15:00Z",
        "updated_at": "2025-01-08T10:15:00Z"
      },
      {
        "id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
        "dashboard": "d6ad65c0-1234-5678-9abc-def012345678",
        "position": 1,
        "type": "bar",
        "title": "Revenue by Region",
        "description": "Breakdown of revenue across regions",
        "spec": {
          "x": "region",
          "y": "revenue",
          "aggregation": "sum"
        },
        "data_preview": {
          "columns": ["region", "revenue"],
          "rows": [
            {"region": "West", "revenue": 450000},
            {"region": "East", "revenue": 380000},
            {"region": "South", "revenue": 420000}
          ],
          "x_axis": "Region",
          "y_axis": "Revenue"
        },
        "config": {},
        "created_at": "2025-01-08T10:15:00Z",
        "updated_at": "2025-01-08T10:15:00Z"
      },
      {
        "id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
        "dashboard": "d6ad65c0-1234-5678-9abc-def012345678",
        "position": 2,
        "type": "insight",
        "title": "AI Insight",
        "description": "Revenue increased 23% compared to last quarter. Top performing region is West with $450K in sales.",
        "spec": {},
        "data_preview": {},
        "config": {},
        "created_at": "2025-01-08T10:15:00Z",
        "updated_at": "2025-01-08T10:15:00Z"
      }
    ],
    "dataset": {
      "id": "1b0b7d3e-1234-5678-9abc-def012345678",
      "name": "Sales Data Q3",
      "status": "cleaned"
    },
    "visibility": "private",
    "status": "completed",
    "created_at": "2025-01-08T10:15:00Z",
    "updated_at": "2025-01-08T10:16:12Z",
    "last_generated_at": "2025-01-08T10:15:00Z"
  }
}

Response Fields

Dashboard Object

Field
Type
Description

id

string (UUID)

Dashboard unique identifier

title

string

Dashboard title

description

string

Dashboard description

layout

object

Dashboard layout configuration including color scheme and narrative snippets

chart_blocks

array

Array of chart/card blocks (see Card Types section below)

dataset

object

Associated dataset information

visibility

string

Dashboard visibility setting

status

string

Dashboard status

created_at

string (ISO 8601)

Creation timestamp

updated_at

string (ISO 8601)

Last update timestamp

last_generated_at

string (ISO 8601)

Last generation timestamp

Chart Block Object

Each item in the chart_blocks array contains:

Field
Type
Description

id

string (UUID)

Unique block identifier

dashboard

string (UUID)

Dashboard ID this block belongs to

position

integer

Display order (0-based)

type

string

Card type (see Card Types section)

title

string

Card title

description

string

Card description

spec

object

Chart configuration (varies by type)

data_preview

object

Chart data with columns, rows, and axis labels

config

object

Additional configuration options

created_at

string (ISO 8601)

Creation timestamp

updated_at

string (ISO 8601)

Last update timestamp

Usage Flow

1

Generate Dashboard

Use POST /api/dashboard/generate/ to create a dashboard.

2

Get Dashboard ID

Extract dashboard_id from the response.

3

Retrieve Dashboard

Call GET /api/dashboard/{id}/ with the dashboard ID.

4

Render Cards

Use the chart_blocks array to render each card type on your platform.

Error Responses

chevron-right404 Not Foundhashtag
chevron-right401 Unauthorizedhashtag
chevron-right403 Forbiddenhashtag