REST API

Code Example

// JavaScript
var $REST = require("gd-sprest");
$REST.Navigation()

// TypeScript
import { Navigation } from "gd-sprest";
Navigation()

Properties

Name Type Description
MenuState() MenuState Get the navigation menu.
MenuState(key: number) MenuState Gets the navigation menu node by the specified key.

Methods

Method Return Type Description
getMenuState(menuNodeKey, depth, customProperties, mapProviderName) MenuState Gets the navigation menu.
Name Type Description
FriendlyUrlPrefix string The URL of the navigation node relative to the URL of the parent navigation node.
Nodes IResults<IMenuNode> The child nodes.
SimpleUrl string The relative or absolute URL of the navigation node. Site-relative URLs can begin with the “~site” URL token and site collection-relative URLs can begin with the “~sitecollection” URL token. Applies only to SimpleLink node types.
SPSitePrefix string The string that replaces the “~sitecollection” token in site collection-relative links. For example, to get the Try Link command to work with the relative link ~sitecollection/Pages/MyPage.aspx, this value might be http://contoso.com/sites/site1/.
SPWebPrefix string The string that replaces the “~site” token in site-relative links. For example, to get the Try Link command to work with the relative link ~site/Pages/MyPage.aspx, this value might be http://contoso.com/sites/site1/web1.
StartingNodeKey string The identifier of the root node in the menu tree.
StartingNodeTitle string The title of the root node in the menu tree. (Example: “Document Center”)
Version string An implementation-specific value that the server uses to detect external changes. For example, it could be a change timestamp for the database or a monotonically increasing version number such as “2009-06-15T20:45:30Z”.
Name Type Description
CustomProperties IResults<any> The node properties.
FriendlyUrlSegment string The URL of the navigation node relative to the URL of the parent navigation node.
IsDeleted boolean Not part of documentation.
IsHidden boolean Indicates whether the node is hidden in the navigation menu. During editing, all nodes temporarily become visible.
Key string The identifier for the navigation node in the menu tree.
Nodes IResults<IMenuNode> The child nodes.
NodeType SPTypes.NodeType The type of the navigation node.
SimpleUrl string The relative or absolute URL of the navigation node. Site-relative URLs can start with the “~site” token and site collection-relative URLs can start with the “~sitecollection” token. Applies only to SimpleLink node types.
Title string The title of the navigation node.