API Reference

Endpoints

GET /v2/menus

Fetch all menus that the Navigation Service provides links for, including the full menu structures.

Query Param source
Description

A valid system code which identifies the application making this request.

Response

Responds with a JSON object, where each property is the name of a menu and each value is a Menu entity. E.g.

GET /v2/menus?source=test
{
	"example-menu": {
		"label": "Example Menu",
		"items": [
			{
				"label": "Example Item",
				"url": "http://example.com/",
				"submenu": null
			}
		]
	}
}

GET /v2/menus/:name

Fetch a single menu by name.

Param name
Description

The name of the menu being fetched. This should reference an existing menu in the Navigation config file

Query Param source
Description

A valid system code which identifies the application making this request.

Response

Responds with a JSON object representing the requested menu. This will be a Menu entity. E.g.

GET /v2/menus/example-menu?source=test
{
	"label": "Example Menu",
	"items": [
		{
			"label": "Example Item",
			"url": "http://example.com/",
			"submenu": null
		}
	]
}

Fetch all links that the Navigation Service provides as a flat array.

Query Param source
Description

A valid system code which identifies the application making this request.

Response

Responds with a JSON array, where each item in the array is an Item entity. E.g.

GET /v2/links?source=test
[
	{
		"label": "Example Item",
		"url": "http://example.com/",
		"submenu": null
	}
]

Entity Types

Menu

A Menu entity represents a navigation menu and can contain multiple Item entities.

{
	"label": "Example Menu",
	"items": []
}
Property label items
Description

String. The label to display when one is required.

Array. An array of Item entities that the menu contains.

Item

An Item entity represents a single navigation item and any submenus that it may have.

{
	"label": "Example Item",
	"url": "http://example.com/",
	"submenu": null
}
Property label url submenu
Description

String or null. The label to display when one is required, or null if there is no label to display.

String or null. The URL that the menu item links to, or null if there is no URL to link to. This value may contain replacement patterns.

Object or null. A Menu entity representing the submenu of this item, or null if there is no submenu.

Replacement Patterns

Some URLs contain patterns that will need to be replaced before presenting to the user. Replacement patterns always take the form: ${name}.

Pattern Request path
Replacement ${currentPath}
Description

The currentPath pattern should be replaced with the path to the current page. This is used in login URLs, for example, where the user will be redirected back to the current page on successful login.