Skip to main content

Menu

Tags: customization, navigation, workspace

Workspace menu customization and navigation

Resources

Request and response models used by the endpoints on this page.

FieldTypeRequiredDescription
childrenArray
createdAtDateTime
cssClassString
iconString
idInteger
isActiveBooleanDefault: True
itemTypeLiteral[page, url, products, none]
labelString
pageIdInteger
pageSlugString
pageTitleString
parentIdInteger
positionInteger
siteIdInteger
targetString
translationsDict[str, str]
updatedAtDateTime
urlString

Example:

{
"id": 0 // Integer,
"siteId": 0 // Integer,
"label": "string" // String,
"itemType": null // Literal[page, url, products, none],
"pageId": 0 // Integer, optional,
"pageSlug": "string" // String, optional,
"pageTitle": "string" // String, optional,
"url": "string" // String, optional,
"parentId": 0 // Integer, optional,
"position": 0 // Integer,
"icon": "string" // String, optional,
"cssClass": "string" // String, optional,
"target": "string" // String, optional,
"isActive": false // Boolean, optional, default: True,
"translations": {} // Dict[str, str], optional,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"children": [] // Array<MenuItemResponse>, optional, default: PydanticUndefined
}
FieldTypeRequiredDescription
itemsArray
siteIdInteger

Example:

{
"siteId": 0 // Integer,
"items": [] // Array<MenuItemResponse>, optional, default: PydanticUndefined
}

Endpoints

Menu

GET /api/v2/w/{workspace_uuid}/sites/{site_id}/menu

Description:

Get the complete menu tree for a site, with optional locale for translated labels.

Authorization: Requires sites:read scope

Parameters:

  • site_id (Integer)
  • locale (String)

Response: See MenuTreeResponse


Items

GET /api/v2/w/{workspace_uuid}/sites/{site_id}/menu/items

Description:

Get all menu items for a site, optionally filtered by parent.

Authorization: Requires sites:read scope

Parameters:

  • site_id (Integer)
  • parent_id (Integer)

Response: List of MenuItemResponse


Items

POST /api/v2/w/{workspace_uuid}/sites/{site_id}/menu/items

Description:

Create a new menu item.

Authorization: Requires sites:write scope

Parameters:

Response: See MenuItemResponse


Delete Items

DELETE /api/v2/w/{workspace_uuid}/sites/{site_id}/menu/items/{item_id}

Description:

Delete a menu item and all its children.

Authorization: Requires sites:admin scope

Parameters:

  • site_id (Integer)
  • item_id (Integer)

Update Items

PUT /api/v2/w/{workspace_uuid}/sites/{site_id}/menu/items/{item_id}

Description:

Update an existing menu item.

Authorization: Requires sites:write scope

Parameters:

Response: See MenuItemResponse


Reorder

POST /api/v2/w/{workspace_uuid}/sites/{site_id}/menu/reorder

Description:

Reorder menu items within the same parent.

Authorization: Requires sites:write scope

Parameters: