younifyd
Menu

Create Panels

Create Multiple panels

POST/panels

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Create Panels action (under Panels).
  3. Fill in the fields below, then reference the result from later steps as {{createPanels.response.data}}.

Request

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

limitinteger

A limit on the number of objects that are returned.

metastring

What metadata to return in the response.

offsetinteger

How many items to skip when fetching data.

sortarray<string>

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.

filterany

Select items in collection by given conditions.

searchstring

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

Request body

Enter the body as JSON in the step's Body field.

dataarray<object>
idstring (uuid)

Primary key of the panel.

dashboardoneOf

Dashboard where this panel is visible. Many-to-one to dashboards.

namestring

Name of the panel.

iconstring

Material design icon for the panel.

colorstring (hexcode)

Accent color of the panel.

show_headerboolean

Whether or not the header should be rendered for this panel.

notestring

Description for the panel.

typestring

The panel type used for this panel.

position_xinteger

The X position on the workspace grid.

position_yinteger

The Y position on the workspace grid.

widthinteger

Width of the panel in number of workspace dots.

heightinteger

Height of the panel in number of workspace dots.

optionsobject

Description for the panel.

date_createdstring (date-time)

When the panel was created

user_createdoneOf

User that created the panel. Many-to-one to users.

json
{
  "data": [
    {
      "id": "22640672-eef0-4ee9-ab04-591f3afb288",
      "dashboard": "a79bd1b2-beb2-49fc-8a26-0b3eec0e269",
      "name": "30-day sales",
      "icon": "paid",
      "color": null,
      "show_header": true,
      "note": "Overview of the sales numbers in the last 30 day",
      "type": "time-series",
      "position_x": 1,
      "position_y": 1,
      "width": 1,
      "height": 1
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{createPanels.response.data.<field>}}.

dataarray<object>
idstring (uuid)

Primary key of the panel.

dashboardoneOf

Dashboard where this panel is visible. Many-to-one to dashboards.

namestring

Name of the panel.

iconstring

Material design icon for the panel.

colorstring (hexcode)

Accent color of the panel.

show_headerboolean

Whether or not the header should be rendered for this panel.

notestring

Description for the panel.

typestring

The panel type used for this panel.

position_xinteger

The X position on the workspace grid.

position_yinteger

The Y position on the workspace grid.

widthinteger

Width of the panel in number of workspace dots.

heightinteger

Height of the panel in number of workspace dots.

optionsobject

Description for the panel.

date_createdstring (date-time)

When the panel was created

user_createdoneOf

User that created the panel. Many-to-one to users.

metaobject
total_countinteger

Returns the total item count of the collection you're querying.

filter_countinteger

Returns the item count of the collection you're querying, taking the current filter/search parameters into account.

json
{
  "data": [
    {
      "id": "22640672-eef0-4ee9-ab04-591f3afb288",
      "dashboard": "a79bd1b2-beb2-49fc-8a26-0b3eec0e269",
      "name": "30-day sales",
      "icon": "paid",
      "color": null,
      "show_header": true,
      "note": "Overview of the sales numbers in the last 30 day",
      "type": "time-series",
      "position_x": 1,
      "position_y": 1,
      "width": 1,
      "height": 1
    }
  ],
  "meta": {
    "total_count": 0,
    "filter_count": 0
  }
}

Need more? See the Directus guide for connection setup and behaviour shared by every action.

Was this page helpful?