Menu items
Use these methods to get information about menu items displayed to clients in the B2Core UI.
GET[host]/api/v2/my/menus |
|
GET[host]/api/v2/my/menus/{menuId} |
Get a menu tree
Use this method to get a menu tree displayed to clients in the B2Core UI.
To obtain detailed information about a specific menu item, use a separate method to get menu item details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
- deep
If
true
, a full menu tree is returned.If
false
(the default value), only direct child items of the root menu item are returned.
The following filter parameters are available for this method:
- menuId
The menu item identifier.
- new
If
true
, a menu item is marked as new in the B2Core UI; otherwise,false
.- caption
The menu item name displayed to clients in the B2Core UI.
- rootName
The name of a root menu item.
This filter parameter is ignored if the
menuId
parameter is specified.
The following sorting parameters are available for this method:
- priority (default)
The priority index assigned to a menu item.
- name
The menu item name used in the Back Office.
- caption
The menu item name displayed to clients in the B2Core UI.
GET[host]/api/v2/my/menus
curl --location -g --request GET 'https://host.name/api/v2/my/menus?sort_order=desc&deep=false&filter[menuId]=1&filter[new]=true&filter[caption]=dashboard&filter[rootName]=general&sort_by=priority' \
--header 'Authorization: Bearer <token>'
Response
A response includes an array of Menu Item objects providing information about the menu items matching the request parameters.
Get menu item details
Use this method to obtain detailed information about a specified menu item.
To obtain a menu tree, use a separate method to get a menu tree.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- menuId required
The menu item identifier.
GET[host]/api/v2/my/menus/{menuId}
curl --location --request GET 'https://host.name/api/v2/my/menus/2' \
--header 'Authorization: Bearer <token>'
Response
A response includes a Menu Item object providing information about the specified menu item.