Sitemap
Endpoint Overview
- Endpoint Name: Sitemap
- Purpose: Retrieves the Sitemap for published pages.
- Method: GET
- URL:
/api/{version}/sitemap
Authentication
- Authentication Type: API key
- Pass the API key in the request header:
FrontendApi key=YOUR_API_KEY
Request
Headers
Header Name | Required | Description |
---|---|---|
FrontendApi key | Yes | Your API Key |
accept | No | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
version | string | The version of the API to be used. Allowed values: v1 , v2 . |
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
culture | Yes | Culture of the website | culture=en-gb |
Response
Response Codes
HTTP Status Code | Meaning |
---|---|
200 | Successful request |
404 | Not Found (resource does not exist) |
500 | Internal Server Error |
Response Body
sitemap
(Array) : contains a collection of objects representing the published pages. See the Sitemap Items section for details.
Sitemap Item
-
url (
Object
): An object representing the published page- value (
String
): The actual URL of the page for the requested culture if available. If not, fallback on the default value - parameters (
Object
): The list of URI parameters for the given URL. See the URI parameters item section for details.
- value (
-
alias (
Object
): An object representing the published page's alias- value (
String
): The actual Alias of the page for the requested culture if available. If not, fallback on the default value - parameters (
Object
): The list of URI parameters for the given Alias. See the URI parameters item section for details.
- value (
Uri parameters
The URI parameter is an object where the name of the field is the name of the URI parameter itself.
- field name: The name of the URI parameter
- validation (
String
): The validation rules applied to the URI parameter - allowedValues: The comma-separated list of allowed values for the URI parameters
- dataPath: The data path for the given item
- validation (
Successful Response Example
This is the response we get from a Sitemap with 1 published page:
- One page with
-
URL
~/news/{folder1}/{slug}
Since it has 2 URI parameters,folder1
andslug
, it has 2 parameter fields:- slug
- with an
allowedValue
:"slugValue1"
- with a
dataPath
:"/wcm/documents"
- with an
- folder1
- with
allowedValue
:"folderValue"
and"folderValue1"
- with a
dataPath
:"/wcm/albums"
- with
- slug
-
Alias
~/n/{folder1}/{slug}
As you can see, it has the same 2 URI parameters,folder1
andslug
, but with different values:- slug
- with
allowedValue
:"two"
- with
- folder1
- with
allowedValue
:"one"
- with
- slug
-
▼ "root": {
▼ "data": {
▼ "sitemap": [
▼ "0": {
▼ "url": {
"value": "~/news/{folder1}/{slug}"
▼ "parameters": {
▼ "slug": {
▼ "validation": {
"allowedValues": "slugValue1"
"dataPath": "/wcm/documents"
}
}
▼ "folder1": {
▼ "validation": {
"allowedValues": "folderValue,folderValue1"
"dataPath": "/wcm/albums"
}
}
}
}
▼ "alias": {
"value": "~/m/{folder1}/{slug}"
▼ "parameters": {
▼ "slug": {
▼ "validation": {
"allowedValues": "two"
}
}
▼ "folder1": {
▼ "validation": {
"allowedValues": "one"
}
}
}
}
}
]
}
}
Common Errors and Troubleshooting
Nothing known.