Dashboards

GET /dashboards

List the organization's dashboards. Each row carries a chart count; the charts themselves come from the dashboard's detail endpoint.

Requires the analytics:read permission.

Query parameters

limitnumber

The number of records to return.

cursorstring

A pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.

sortname | -name | createdAt | -createdAt

The sort order. Prefix a field with - to sort descending. Defaults to -createdAt.

filterstring

A JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, name, createdAt. See Filtering for the syntax.

Request
curl \
  "https://your-store.meisei.app/api/dashboards" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "A4Ws1igz",
      "name": "string",
      "chartCount": 0,
      "isDefault": true,
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ],
  "nextCursor": "string"
}

POST /dashboards

Create an empty dashboard. Charts are created onto it with POST /saved-charts.

Requires the analytics:write permission.

Body parameters

namestringrequired

The dashboard's title.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/dashboards" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "name": "string",
  "chartCount": 0,
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

GET /dashboards/{id}

Get a single dashboard by ID, with its charts in reading order (by grid row, then column), ready to run against /analytics/query.

Requires the analytics:read permission.

Path parameters

idstringrequired

The ID of the dashboard.

Request
curl \
  "https://your-store.meisei.app/api/dashboards/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "name": "string",
  "chartCount": 0,
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "charts": [
    {
      "id": "A4Ws1igz",
      "dashboardId": "A4Ws1igz",
      "name": "string",
      "resource": "reviews",
      "chartType": "stat",
      "query": {
        "measures": "...",
        "groupBy": "...",
        "granularity": "...",
        "filter": "...",
        "limit": "...",
        "lastDays": "..."
      },
      "layout": {
        "x": "...",
        "y": "...",
        "w": "...",
        "h": "..."
      },
      "invalidReason": "string",
      "feedCreatedAt": "2025-01-15T09:30:00Z",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ]
}

PUT /dashboards/{id}

Rename a dashboard, or make it the one the app opens by default. Promoting a default demotes the dashboard that held it. Positions are changed through the layout endpoint.

Requires the analytics:write permission.

Path parameters

idstringrequired

The ID of the dashboard to update.

Body parameters

namestring

The dashboard's title.

isDefaultboolean

Set to true to make this the dashboard the app opens by default, which demotes the one that held it. Set to false to leave the organization with no default.

Request
curl \
  -X PUT \
  "https://your-store.meisei.app/api/dashboards/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "isDefault": true
}'
Response
{
  "id": "A4Ws1igz",
  "name": "string",
  "chartCount": 0,
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

DELETE /dashboards/{id}

Delete a dashboard and every chart on it. Each deletion is recorded in the audit log.

Requires the analytics:write permission.

Path parameters

idstringrequired

The ID of the dashboard to delete.

Request
curl \
  -X DELETE \
  "https://your-store.meisei.app/api/dashboards/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "name": "string",
  "chartCount": 0,
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

PUT /dashboards/{id}/layout

Replace the dashboard's whole grid layout in one write, so a drag session is one request. The payload has to place every chart on the dashboard exactly once, inside the 12 column grid.

Requires the analytics:write permission.

Path parameters

idstringrequired

The ID of the dashboard.

Body parameters

dataobject[]required

Where every chart on the dashboard sits. The whole layout is replaced in one write, so one drag session is one request.

Request
curl \
  -X PUT \
  "https://your-store.meisei.app/api/dashboards/A4Ws1igz/layout" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": [
    {
      "chartId": "string",
      "x": 0,
      "y": 0,
      "w": 0,
      "h": 0
    }
  ]
}'
Response
{
  "id": "A4Ws1igz",
  "name": "string",
  "chartCount": 0,
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "charts": [
    {
      "id": "A4Ws1igz",
      "dashboardId": "A4Ws1igz",
      "name": "string",
      "resource": "reviews",
      "chartType": "stat",
      "query": {
        "measures": "...",
        "groupBy": "...",
        "granularity": "...",
        "filter": "...",
        "limit": "...",
        "lastDays": "..."
      },
      "layout": {
        "x": "...",
        "y": "...",
        "w": "...",
        "h": "..."
      },
      "invalidReason": "string",
      "feedCreatedAt": "2025-01-15T09:30:00Z",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ]
}