---
title: "Bulk widget data — future-request"
method: POST
path: "/dashboards/{dashboard_id}/widgets/data"
tags: ["Dashboard"]
---

# Bulk widget data — future-request

`POST /dashboards/{dashboard_id}/widgets/data`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/{dashboard_id}/widgets/data`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Fetch data for N widgets of a dashboard in one call. Returns a job_id immediately; client polls /jobs/{id}. The future's response is a {widgets: {widget_id: {status, data?, error?}}, expected, completed} map that fills in as each widget query completes.

## Path parameters

- `dashboard_id` integer, required

## Request body

- BulkWidgetDataSpec: Bulk widget data request — returns a single job_id
  - `params` BulkWidgetDataParams, required: Bulk widget data parameters
    - `widgets` WidgetDataParams[], required: Widgets to fetch
      - `widget_id` string, uuid, required: UUID of the widget requesting data
      - `global_filters` object: Global filters from sidebar. Key=column, Value=filter value
      - `drilldown_filters` object: Drilldown filters from chart clicks. Always exact match.
    - `rls_preview_value` string, nullable: Creator-only 'Viewing as' preview: scope the whole dashboard to a single RLS column value. Honored only for editors; ignored for viewers (a viewer can never widen their own scope).

## Response `201`

Document created, URL follows

- ObjectJobSchema
  - `status_code` integer, nullable
  - `job_id` integer, nullable: Created job id
  - `failure_reason` string, nullable: Failure reason if status is failure

## Other responses

- `202`: Successfully Submitted
- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
