Skip to main content

Menu

Endpoint Overview

  • Endpoint Name: Menu
  • Purpose: Retrieves the definition of a menu from Page Builder.
  • Method: GET
  • URL: /api/{version}/menu

Authentication

  • Authentication Type: API key
  • Pass the API key in the request header: FrontendApi key=YOUR_API_KEY

Request

Headers

Header NameRequiredDescription
FrontendApi keyYesYour API Key
acceptNoapplication/json

Path Parameters

ParameterTypeDescription
versionstringThe version of the API to be used. Allowed values: v1, v2.

Query Parameters

ParameterMandatoryDescriptionExample
pathYesRelative path of the Page Builder or Visual Site Manager menu you want to render.path=~/_libraries/_primary-nav-links
path=/_libraries/_primary
path=_libraries/_primary
cultureYesCulture of the website.culture=en-gb
environmentYesEnvironment where the page is executed.environment=integration
tokenNoUsed in the preview workflow, it enables the preview behavior of the page endpoint.

Get the token returned by the Method: preview (FE API).
Token's example

Response

Response Codes

HTTP Status CodeMeaning
200Successful request
404Not Found (resource does not exist)
500Internal Server Error

Response Body

  • path (String): The path requested
  • name (String): The name of the menu requested
  • items (Array): An array of nested menus
    See the Item Types section below for details.
  • variables (Array): An array of objects containing the variables available for the requested page.
    See the Variable Types section for details. Possible type values are:

Item Type

  • id (String): The menu ID
  • text (String): The menu text property
  • tag (String): The menu tag property
  • tooltip (String): The menu tooltip property
  • link (String): The menu link property
  • target (String): The menu target property
  • visible (Boolean): The menu visible property
  • icon (Object): An object representing the icon property
    • data (String): The menu icon property
  • properties (Object): An object representing the properties property
    • data (String): The menu properties property
  • items (Array): An array of nested menus
    See the Item Types section for details.

Variable Type: KeyValue

  • key (String): The name of the variable
  • type (String): The type of variable
  • keyValue (Object): An object containing the value of the variable
    • value: The value of the variable (string, number, boolean, guid, datetime — only dates expressed as yyyy-MM-dd will be accepted)

Variable Type: Stylesheet

  • key (String): The name of the variable
  • type (String): The type of variable
  • stylesheet (Object): An object containing the stylesheet information
    • source (String): The URL of the CSS to be loaded

Variable Type: Script

  • key (String): The name of the variable
  • type (String): The type of variable
  • script (Object): An object containing the script information
    • source (String): The URL of the JavaScript file to be loaded
    • async (Boolean): The value of the async attribute rendered on the <script> tag
    • defer (Boolean): The value of the defer attribute rendered on the <script> tag

Variable Type: DataItem

  • key (String): The name of the variable
  • type (String): The type of variable
  • dataItem (Object): An object containing the information of the single FORGE WCM entity to retrieve
    • path (String): The WCM data path
    • entityType (String): The .NET type DTO to map the JSON response

Variable Type: DataList

  • key (String): The name of the variable
  • type (String): The type of variable
  • dataList (Object): An object containing the information of the FORGE WCM entities to retrieve
    • path (String): The WCM data path
    • entityType (String): The .NET type DTO to map the JSON response

Successful Response Example

Request https://forge-feapi.com/api/v1/menu?path=~/_libraries/_primary-nav-links&culture=en-gb&environment=integration

Response

"root": {
"data": {
"path": "~/_libraries/_primary-nav-links-sub"
"name": "_primary-nav-links-sub"
"items": [
"0": {
"id": "0bc34b55-c95f-49f8-9ff3-fef63eff8d43"
"text": "First Group"
"visible": true
"properties": {
"data": "uionly:true"
}
"items": [
"0": {
"id": "2b117679-a3fc-4204-b0f2-01ade2422b99"
"text": "News Centre"
"tag": "news-centre-title"
"link": "/news-centre/index"
"visible": true
"items": [
]
}
"1": {
"id": "b062827e-c80e-420e-abc3-11015dac33fb"
"text": "Calendar"
"tag": "calendar"
"link": "/news-centre/calendar/"
"visible": true
"items": [
]
}
"2": {
"id": "3e69bf48-5f0e-43f1-afe0-7fef9291ee87"
"text": "test page"
"tag": "calendar"
"link": "/calendar/test-page"
"visible": false
"items": [
]
}
"3": {
"id": "c6b064c7-cc0e-40a5-a2fa-bfe390f74f5a"
"text": "Federations"
"tag": "federation"
"visible": true
"items": [
]
}
"4": {
"id": "641db9e4-fe56-4782-b99d-c0f441968602"
"text": "About Us"
"tag": "about-us"
"visible": false
"items": [
]
}
]
}
"1": {
"id": "c185c2f5-2d38-4750-a1c3-1d6ee7c70a88"
"text": "Second Group"
"visible": true
"properties": {
"data": "uionly:true"
}
"items": [
"0": {
"id": "1d010967-746c-4fd0-ac96-aed354d14eb3"
"text": "About FORGE GOX"
"tag": "about-forge-go-menu"
"link": "/news/forge-go-key-modules"
"visible": true
"items": [
]
}
"1": {
"id": "8a514021-5795-4c84-a4e6-96b021997b13"
"text": "LIVE BLOGGING"
"tag": "news-centre-menu-liveblogging"
"link": "/live-blogging/"
"visible": true
"items": [
"0": {
"id": "96fcb215-999c-4673-b645-290e5437b71a"
"text": "Live Blogging detail"
"link": "/live-blogging/qa-blog"
"visible": true
"items": [
]
}
]
}
"2": {
"id": "30ceec3e-8cd0-4b59-811f-12b457f389ac"
"text": "VISUAL STORIES"
"link": "/visual-stories/"
"visible": false
"items": [
]
}
"3": {
"id": "47feeb76-b203-410f-b3ea-454809790fbb"
"text": "Samples"
"link": "/qa/section_usage"
"visible": true
"icon": {
"data": "test"
}
"items": [
"0": {
"id": "c912f3b1-afef-4fa1-a001-d934bfc37631"
"text": "Infinite Scroll Article 1"
"tag": "infinite-scroll-article"
"link": "/qa/infinite-scroll-article"
"visible": true
"items": [
]
}
]
}
]
}
"2": {
"id": "8390cf02-74f9-4106-9e57-8d4133de4617"
"text": "Third Group"
"visible": true
"items": [
"0": {
"id": "396f3b68-07f1-4c5b-bd16-3e65fad31c7c"
"text": "QA"
"link": "/qa/index"
"visible": true
"items": [
]
}
]
}
]
"variables": [
"0": {
"type": "keyValue"
"key": "sociallinks"
"keyValue": {
"value": "~/_libraries/_social-links"
"valueType": "string"
}
}
"1": {
"type": "keyValue"
"key": "footerlink"
"keyValue": {
"value": "~/_libraries/_footer-links"
"valueType": "string"
}
}
"2": {
"type": "keyValue"
"key": "languages"
"keyValue": {
"value": "~/_libraries/_languages"
"valueType": "string"
}
}
"3": {
"type": "keyValue"
"key": "secondarynavmenu"
"keyValue": {
"value": "~/_libraries/_secondary-nav-newscenter-links"
"valueType": "string"
}
}
"4": {
"type": "keyValue"
"key": "searchlinks"
"keyValue": {
"value": "~/_libraries/_search-links"
"valueType": "string"
}
}
"5": {
"type": "keyValue"
"key": "fontfamilytitle"
"keyValue": {
"value": "Rubik"
"valueType": "string"
}
}
"6": {
"type": "keyValue"
"key": "primarynavmenu"
"keyValue": {
"value": "~/_libraries/_primary-nav-links-sub"
"valueType": "string"
}
}
"7": {
"type": "keyValue"
"key": "inc_header"
"keyValue": {
"value": "~/_libraries/_header"
"valueType": "string"
}
}
"8": {
"type": "keyValue"
"key": "inc_footer"
"keyValue": {
"value": "~/_libraries/_footer"
"valueType": "string"
}
}
"9": {
"type": "keyValue"
"key": "sitename"
"keyValue": {
"value": "culture parent"
"valueType": "string"
}
}
"10": {
"type": "keyValue"
"key": "inc_amp_header"
"keyValue": {
"value": "~/_libraries/_ampheader"
"valueType": "string"
}
}
"11": {
"type": "keyValue"
"key": "user_profile"
"keyValue": {
"value": "/account/profile/overview"
"valueType": "string"
}
}
"12": {
"type": "keyValue"
"key": "hello"
"keyValue": {
"value": "Random value"
"valueType": "string"
}
}
]
}
"meta": {
"version": "1.0"
}
}

Common Errors and Troubleshooting

Nothing known.