Dashboards

Dashboards within the Insights module organize different Panels into an at-a-glance view. They can be used to group data based on department, objective, business process or anything you choose.

List Dashboards

List all dashboards that exist in Directus.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

offset
integer

How many items to skip when fetching data.

meta
string

What metadata to return in the response.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

page
integer

Cursor for use in pagination. Often used in combination with limit.

Response

Successful request

data
array
meta
object
GET /dashboards
Response Example
{
  "data": [
    {
      "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
      "name": "My dashboard",
      "icon": "space_dashboard",
      "note": "Test",
      "date_created": "2023-01-25T19:16:49.009Z",
      "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
      "color": null,
      "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
    }
  ],
  "meta": {}
}

Create Multiple Dashboards

Create multiple new dashboards.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

Request Body

data
array

Response

Successful request

data
array
meta
object
POST /dashboards
Response Example
{
  "data": [
    {
      "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
      "name": "My dashboard",
      "icon": "space_dashboard",
      "note": "Test",
      "date_created": "2023-01-25T19:16:49.009Z",
      "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
      "color": null,
      "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
    }
  ],
  "meta": {}
}

Delete Multiple Dashboards

Delete multiple existing dashboards.

Request Body

An array of dashboard primary keys.

[array]
array
DELETE /dashboards

Update Multiple Dashboards

Update multiple dashboards at the same time.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

How to sort the returned items. sort is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (-) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ? to sort randomly.

filter

Select items in collection by given conditions.

search
string

Filter by items that contain the given search query in one of their fields.

Request Body

data
object
keys
array

Response

Successful request

data
array
meta
object
PATCH /dashboards
Response Example
{
  "data": [
    {
      "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
      "name": "My dashboard",
      "icon": "space_dashboard",
      "note": "Test",
      "date_created": "2023-01-25T19:16:49.009Z",
      "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
      "color": null,
      "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
    }
  ],
  "meta": {}
}

Create a Dashboard

Create a new dashboard.

Query Parameters

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
POST /dashboards‎
Response Example
{
  "data": {
    "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
    "name": "My dashboard",
    "icon": "space_dashboard",
    "note": "Test",
    "date_created": "2023-01-25T19:16:49.009Z",
    "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
    "color": null,
    "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
  }
}

Retrieve a Dashboard

List an existing dashboard by primary key.

Query Parameters

id
string

Unique identifier of the Dashboard.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Response

Successful request

data
object
GET /dashboards/{id}
Response Example
{
  "data": {
    "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
    "name": "My dashboard",
    "icon": "space_dashboard",
    "note": "Test",
    "date_created": "2023-01-25T19:16:49.009Z",
    "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
    "color": null,
    "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
  }
}

Delete a Dashboard

Delete an existing dashboard.

Query Parameters

id
string

Unique identifier of the dashboard.

DELETE /dashboards/{id}

Update a Dashboard

Update an existing dashboard.

Query Parameters

id
string

Unique identifier of the dashboard.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
PATCH /dashboards/{id}
Response Example
{
  "data": {
    "id": "a79bd1b2-beb2-49fc-8a26-0b3eec0e2697",
    "name": "My dashboard",
    "icon": "space_dashboard",
    "note": "Test",
    "date_created": "2023-01-25T19:16:49.009Z",
    "user_created": "fd066644-c8e5-499d-947b-fe6c6e1a1473",
    "color": null,
    "panels": "22640672-eef0-4ee9-ab04-591f3afb2883"
  }
}