Skip to main content

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 NameRequiredDescription
FrontendApi keyYesYour API Key
acceptNoapplication/json

Path Parameters

ParameterTypeDescription
versionstringThe version of the API to be used. Allowed values: v1, v2.

Query Parameters

ParameterMandatoryDescriptionExample
cultureYesCulture of the websiteculture=en-gb

Response

Response Codes

HTTP Status CodeMeaning
200Successful request
404Not Found (resource does not exist)
500Internal 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.
  • 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.

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

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 and slug, it has 2 parameter fields:

      • slug
        • with an allowedValue: "slugValue1"
        • with a dataPath: "/wcm/documents"
      • folder1
        • with allowedValue: "folderValue" and "folderValue1"
        • with a dataPath: "/wcm/albums"
    • Alias ~/n/{folder1}/{slug}
      As you can see, it has the same 2 URI parameters, folder1 and slug, but with different values:

      • slug
        • with allowedValue: "two"
      • folder1
        • with allowedValue: "one"
"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.