Navigation

Get site navigation tree

Changed on

Returns the dotCMS site navigation tree starting at the given folder URI, up to the specified depth. Only objects marked as 'show on menu' are included. The URI must resolve to a folder — page URIs (e.g., '/index', '/about-us/team') will return 404. Use '/' to fetch the navigation tree for the site root.

get/api/v1/nav/{uri}

Request

Path parameters

uristring required

Starting folder URI for the navigation tree (e.g., '/about-us', '/blog', or '/' for the site root). Must resolve to a folder — page URIs return 404.

Query parameters

depthinteger

Total number of levels to include, counting the starting node as level 1. depth=1 returns only the starting node with no children; depth=2 returns the node plus its direct children. Values exceeding the actual tree depth return the full subtree. Values less than 1 are treated as 1. (default: 1)

languageIdinteger

Tags each returned node with this language ID. Note: folder names are language-neutral in dotCMS and are not translated — this parameter only affects the 'languageId' attribute on each node, not the visible 'title'. Defaults to the language of the current request.

Response

Navigation tree retrieved successfully

entityobject
i18nMessagesMapobject
permissionsstring[]

Changes

    • breaking

      added the pattern .* to the path request parameter uri

    • breaking

      for the query request parameter depth, the type changed from string to integer, and format from no format to int32

    • breaking

      for the query request parameter languageId, the type changed from string to integer, and format from no format to int64

    • info

      api operation id loadJson_1 removed and replaced with getNavigationTree

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status