Sitemap operations
Sitefinity’s OData web services expose a single endpoint that allows querying data from Sitefinity CMS sitemap. Such data can be used to construct navigation widgets. The navigation widget in Sitefinity .NET Core renderer uses this endpoint.
IMPORTANT: The following endpoint is designed to support .NET Core development only. You cannot use the endpoint for MVC development.
For a comparison on using .NET Core vs using MVC framework, see Development comparison.
NOTE: This endpoint does not require authentication.
To use the endpoint, execute a POST
request to the following endpoint:
{baseurl}/api/default/pages/Default.HierarhicalByLevelsResponse()
Sample request
POST
http://mysite.com/api/default/pages/Default.HierarhicalByLevelsResponse()
Sample response
There are query parameters that can be added to this request. For example:
selectionModeString
can have one of the following values:
TopLevelPages
This will force the request to take only the root level pages’ data. This is the default case.
SelectedPages
works in conjunction with selectedPages
to take only the explicitly stated pages’ data.
-
CurrentPageSiblings
works in conjunction with sf_page_node
It returns only the data for the sibling pages of the currently targeted page by the sf_page_node
parameter.
-
CurrentPageChildren
works in conjunction with sf_page_node
It returns only the data for the child pages of the currently targeted page by the sf_page_node
parameter.
-
SelectedPageChildren
works in conjunction with selectedPageId
It returns only the data for the child pages of the currently targeted page by the selectedPageId parameter.
-
showParentPage
shows information about the parent page
This parameters is a Boolean
.
selectedPageId
returns the GUID
of a page node
selectedPages
returns the GUID
array of page node IDs
sf_page_node
returns the GUID
of a page node
The following example uses some of the above query parameters:
Sample request (with query parameters)
POST
http://mysite.com/api/default/pages/Default.HierarhicalByLevelsResponse()?selectionModeString=SelectedPages&showParentPage=False&selectedPageId=00000000-0000-0000-0000-000000000000&selectedPages=["b5cb445c-bb30-4169-9476-422a1daf3df5","45b8578a-0184-456c-9f0d-68843df4af64","882c78d7-dc3a-4934-998f-2eeae074459f"]&sf_page_node=882c78d7-dc3a-4934-998f-2eeae074459f
Sample response