Layouts API Routes

An admin can modify the layout of their admin dashboard. This allows admins to customize their dashboard to their preferences and needs. These API routes allow admin users to manage layouts.

GET /admin/layouts/configurations#

List Layout Configurations

Retrieve a list of layout configurations made by admin users. The layouts can be filtered by fields such as id. The layouts can also be sorted or paginated.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Query parameters

idstring | string[]Optional
Filter by layout configuration ID.
zonestring | string[]Optional
Filter by layout configuration zone.
user_idstring | string[]Optional
Filter by the ID of the user who created the layout configuration.
is_system_defaultbooleanOptional
Filter by whether the layout configuration is a system default.
limitnumberOptional
Limit the number of items returned in the list.
offsetnumberOptional
The number of items to skip when retrieving a list.
orderstringOptional
The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.
with_deletedbooleanOptional
The layout's with deleted.
fieldsstringOptional
Comma-separated fields that should be included in the returned data. If a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.
$andobject[]Optional
Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
$orobject[]Optional
Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.

Request examples

Responses

200 OK

limitnumber
The maximum number of items returned in the list.
offsetnumber
The number of items skipped before retrieving the list.
countnumber
The total number of items in the list.
estimate_countnumberOptional
The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
layout_configurationsobject[]
The list of layout configurations.

400, 401, 404, 409, 422, 500: an error response is returned.


GET /admin/layouts/{zone}/configuration#

List Layout Configurations

Retrieve a list of layout configurations for a specific zone. These are the configurations made by the users for their admin dashboard layouts.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

zonestring
The zone for which the layout configurations should be retrieved.

Request examples

Responses

200 OK

personal_configurationobject
The layout configuration's details.
default_configurationobject
The layout configuration's details.
active_scope"default" | "personal"
The active scope of the layout configuration.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/layouts/{zone}/configuration#

Add Layout Configuration

Add a layout configuration for a specific zone. This allows you to customize the layout of the admin dashboard for that zone, including the arrangement of widgets and other UI elements.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

zonestring
The zone for which the layout configuration should be added.

Request body (application/json)

is_defaultbooleanOptional
Whether the layout configuration is set as the default for the zone.
configurationobject
The layout's configuration.

Request examples

Responses

200 OK

personal_configurationobject
The layout configuration's details.
default_configurationobject
The layout configuration's details.
active_scope"default" | "personal"
The active scope of the layout configuration.

400, 401, 404, 409, 422, 500: an error response is returned.


DELETE /admin/layouts/{zone}/configuration#

Clear Configuration of Layout

Clears all user layout configurations for a given zone. This action will remove any customizations made by the user and revert to the system defaults.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

zonestring
The zone for which the layout configuration should be cleared.

Request examples

Responses

200 OK

successboolean
Whether the layout configuration was successfully cleared.

400, 401, 404, 409, 422, 500: an error response is returned.

Found a problem with this page?Report Issue
Edited Nov 14·Edit this page