Sitecore XM Apps REST API (v1)

Use the XM Apps REST API for managing sites, site collections, pages, and languages in the XM Apps system.

This API lets you interact with:

  • The Site Collection object. Use a site collection to group together related sites that share the same resources.
  • The Site object. The site object is the core entity that represents a website in the customer portfolio.
  • The Language object. The language object is used to manage the languages available to a tenant and site.
  • The Job object. The job object is used to manage running background jobs.

Note the following:

  • All API requests are made in your production environment.

For more information, see the official Sitecore XM Cloud developer documentation.

Authorization

To authorize your requests, use environment automation client credentials and generate a JSON Web Token (JWT).

Note: To create client credentials, you must be an Organization Admin or Organization Owner.

Create an automation client

  1. In the Sitecore Cloud Portal, open XM Cloud Deploy.
  2. Click Credentials > Environment > Create credentials > Automation.
  3. Fill out the automation client details, then click Create.
  4. Copy the client ID and the client secret because you won't be able to view them again in XM Cloud Deploy. You'll use them to request a JWT.

Request a JWT

Run the following cURL command to request a JWT. Replace the placeholder values with your client ID and client secret.

  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'client_id={YOUR_CLIENT_ID}' \
  --data-urlencode 'client_secret={YOUR_CLIENT_SECRET}' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'audience=https://api.sitecorecloud.io'

In the response, the access_token key contains the JWT:

  {
    "access_token": "{YOUR_JWT}",
    "scope": "xmcloud.cm:admin",
    "expires_in": 86400,
    "token_type": "Bearer"
  }

The JWT expires in 24 hours. If your requests unexpectedly return a response with status 401 Unauthorized, request a new JWT by repeating this POST request.

We recommend that you cache the JWT for 24 hours to avoid repeating this POST request while the JWT is still valid.

Include the JWT in the request header

You can now start making REST API requests. You must include the JWT in the request header of every request. For example:

curl -X GET '{YOUR_BASE_URL}/...' \
-H 'Authorization: Bearer {YOUR_JWT}' \
-H 'Accept: application/json'
Download OpenAPI description
Overview
License Apache 2.0
Languages
Servers
Production server
https://xmapps-api.sitecorecloud.io/

Sites

The Sites API lets you create and manage sites for an environment. Learn more about Sites.

Operations

List sites

Request

Fetches the list of sites in the environment, with associated details.

curl -i -X GET \
  https://xmapps-api.sitecorecloud.io/api/v1/sites \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring or null

The identifier of the site. Example value: 497f6eca-6276-4993-bfeb-53cbbbba6f08

Example: "497f6eca-6276-4993-bfeb-53cbbbba6f08"
namestring or null

The name of the site. Example value: skate-park

Example: "skate-park"
descriptionstring or null

The description of the site. Example value: New site for Brand A in English-speaking countries

Example: "New site for Brand A in English-speaking countries"
displayNamestring or null

The display name of the site. Example value: Skate Park Website

Example: "Skate Park Website"
thumbnailobject(Thumbnail)

The thumbnail response entity.

collectionIdstring or null

The identifier of the collection to which the site belongs. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
createdstring(date-time)

The date when the site was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the site. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
sortOrderinteger or null(int32)

Sort order of the site.

Example: 100
permissionsobject(Permissions)

The access rights of the current user to the site.

languagesArray of strings or null

The list of languages in use by the site.

Example: ["en-US","en-CA"]
hostsArray of objects or null(Host)

The list of hosts that the site resolves to.

supportedLanguagesArray of strings or null

The list of languages supported by Sitecore.

Example: ["en-US","en-CA"]
errorPagesobject(ErrorPages)

An object containing the site error pages

settingsobject or null

The settings for the site.

Example: {"thumbnailsRootPath":"/sitecore/media library/Project/sample-collection/sample-site","generateThumbnails":"true"}
propertiesobject or null

The read-only properties of the site.

Example: {"SxaSiteTemplate":"{E46F3AF2-39FA-4866-A157-7017C4B2A40C}","IsSxaSite":"true"}
]
Response
application/json
[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "skate-park", "description": "New site for Brand A in English-speaking countries", "displayName": "Skate Park Website", "thumbnail": {}, "collectionId": "5aae1eeaea2440bf96f11f43da82c77b", "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf", "sortOrder": 100, "permissions": {}, "languages": [], "hosts": [], "supportedLanguages": [], "errorPages": {}, "settings": {}, "properties": {} } ]

Create a site

Request

Creates a site for the environment. Sites are created using site templates. Every site belongs to a site collection. You can either create a site inside an existing collection or create a new one. It is also possible to create a site by duplicating a site.

Bodyrequired

Input model

languagestringnon-emptyrequired

The language for the site. If you do not know what languages are available in the environment, first retrieve the list of languages. If the language you want is not available in the environment, add the language first. Example value: en

Example: "en"
siteNamestring[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$required

The name of the site. Example value: skate-park

Default "string"
Example: "skate-park"
templateIdstringnon-empty(?i)^(?:[({][0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?...required

The ID of the template used to create the site. If you don't know the template ID, first retrieve site templates. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
displayNamestring or null[ 0 .. 50 ] characters

The display name for the site. Example value: Skate Park Site

Example: "Skate Park Site"
collectionIdstring or null(?i)^(?:[({][0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?...

The ID of the collection you want the new site to belong to. If you don't know the collection ID, first retrieve collections. Required if Sitecore.XmApps.Sites.Models.REST.NewSiteInput.CollectionName is not provided. If left empty, you must provide collectionName instead and a new collection will be created along with the newly created site. If both collectionId and collectionName are provided, collectionName will be ignored. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
languagesArray of strings or null

The list of supported languages for the site.

Example: ["en","da"]
hostNamestring or null

Optional hostname for the new site. Default value: * Example value: dev.skate-park.com

Example: "dev.skate-park.com"
descriptionstring or null[ 0 .. 100 ] characters

Optional text that provides a meaningful description of the site. Example value: New site for Brand A in English-speaking countries.

Example: "New site for Brand A in English-speaking countries."
collectionNamestring or null[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$

The name of the new collection you want the new site to belong to. Required if Sitecore.XmApps.Sites.Models.REST.NewSiteInput.CollectionId is not provided. If left empty, you must provide collectionId of an existing collection you want the new site to belong to. If both collectionId and collectionName are provided, collectionName will be ignored. Example value: Brand A

Example: "Brand A"
collectionDisplayNamestring or null[ 0 .. 50 ] characters

The display name for the collection. Example value: Skate Park Site

Example: "Skate Park Site"
collectionDescriptionstring or null[ 0 .. 100 ] characters

If you want to create a new site collection while creating a new site, you can provide a collection description. Example value: Sample description for the site collection containing Sites for Brand A

Example: "Sample description for the site collection containing Sites for Brand A"
posMappingsArray of objects or null(AnalyticsIdentifier)

The site identifier for the site. This identifier lets you control analytics and personalization for the site.

curl -i -X POST \
  https://xmapps-api.sitecorecloud.io/api/v1/sites \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "siteName": "skate-park",
    "displayName": "Skate Park Site",
    "templateId": "5aae1eeaea2440bf96f11f43da82c77b",
    "collectionId": "5aae1eeaea2440bf96f11f43da82c77b",
    "language": "en",
    "languages": [
      "en",
      "da"
    ],
    "hostName": "dev.skate-park.com",
    "description": "New site for Brand A in English-speaking countries.",
    "collectionName": "Brand A",
    "collectionDisplayName": "Skate Park Site",
    "collectionDescription": "Sample description for the site collection containing Sites for Brand A",
    "posMappings": [
      {
        "name": "skate-park",
        "language": "en"
      }
    ]
  }'

Responses

Successful operation

Bodyapplication/json
string
Response
application/json
"string"

Retrieve a site

Request

Fetches information about a site.

Path
siteIdstringrequired

The identifier of the site.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
idstring or null

The identifier of the site. Example value: 497f6eca-6276-4993-bfeb-53cbbbba6f08

Example: "497f6eca-6276-4993-bfeb-53cbbbba6f08"
namestring or null

The name of the site. Example value: skate-park

Example: "skate-park"
descriptionstring or null

The description of the site. Example value: New site for Brand A in English-speaking countries

Example: "New site for Brand A in English-speaking countries"
displayNamestring or null

The display name of the site. Example value: Skate Park Website

Example: "Skate Park Website"
thumbnailobject(Thumbnail)

The thumbnail response entity.

collectionIdstring or null

The identifier of the collection to which the site belongs. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
createdstring(date-time)

The date when the site was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the site. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
sortOrderinteger or null(int32)

Sort order of the site.

Example: 100
permissionsobject(Permissions)

The access rights of the current user to the site.

languagesArray of strings or null

The list of languages in use by the site.

Example: ["en-US","en-CA"]
hostsArray of objects or null(Host)

The list of hosts that the site resolves to.

supportedLanguagesArray of strings or null

The list of languages supported by Sitecore.

Example: ["en-US","en-CA"]
errorPagesobject(ErrorPages)

An object containing the site error pages

settingsobject or null

The settings for the site.

Example: {"thumbnailsRootPath":"/sitecore/media library/Project/sample-collection/sample-site","generateThumbnails":"true"}
propertiesobject or null

The read-only properties of the site.

Example: {"SxaSiteTemplate":"{E46F3AF2-39FA-4866-A157-7017C4B2A40C}","IsSxaSite":"true"}
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "skate-park", "description": "New site for Brand A in English-speaking countries", "displayName": "Skate Park Website", "thumbnail": { "url": "https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png", "rootPath": "sitecore/media library/Project/sample-collection/sample-site", "autogenerated": true }, "collectionId": "5aae1eeaea2440bf96f11f43da82c77b", "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf", "sortOrder": 100, "permissions": { "canAdmin": false, "canWrite": false, "canCreate": false, "canDelete": false, "canRename": false, "canRead": false, "canPublish": false, "canDuplicate": false }, "languages": [ "en-US", "en-CA" ], "hosts": [ {} ], "supportedLanguages": [ "en-US", "en-CA" ], "errorPages": { "errorPage": "string", "notFoundPage": "string" }, "settings": { "thumbnailsRootPath": "/sitecore/media library/Project/sample-collection/sample-site", "generateThumbnails": "true" }, "properties": { "SxaSiteTemplate": "{E46F3AF2-39FA-4866-A157-7017C4B2A40C}", "IsSxaSite": "true" } }

Update a site

Request

Updates various parameters of a site. To change the name of a site, see rename a site.

Path
siteIdstringrequired

The identifier of the site.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
Body

Various site configuration properties

displayNamestring or null[ 0 .. 50 ] characters

The display name for the site. Example value: Skate Park Site

Default "string"
Example: "Skate Park Site"
descriptionstring or null[ 0 .. 100 ] characters

The description for the site. Example value: New site for Brand A in English-speaking countries.

Default "string"
Example: "New site for Brand A in English-speaking countries."
supportedLanguagesArray of strings or null

The list of languages supported by Sitecore.

Example: ["en-US","en-CA"]
sharedboolean or null

Indicates if the site should be marked as shared or not

errorPagesobject(ErrorPages)

An object containing the site error pages

sortOrderinteger or null(int32)

The sort order of the site.

Example: 100
curl -i -X PATCH \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "Skate Park Site",
    "description": "New site for Brand A in English-speaking countries.",
    "supportedLanguages": [
      "en-US",
      "en-CA"
    ],
    "shared": true,
    "errorPages": {
      "errorPage": "string",
      "notFoundPage": "string"
    },
    "sortOrder": 100
  }'

Responses

Successful operation

Bodyapplication/json
idstring or null

The identifier of the site. Example value: 497f6eca-6276-4993-bfeb-53cbbbba6f08

Example: "497f6eca-6276-4993-bfeb-53cbbbba6f08"
namestring or null

The name of the site. Example value: skate-park

Example: "skate-park"
descriptionstring or null

The description of the site. Example value: New site for Brand A in English-speaking countries

Example: "New site for Brand A in English-speaking countries"
displayNamestring or null

The display name of the site. Example value: Skate Park Website

Example: "Skate Park Website"
thumbnailobject(Thumbnail)

The thumbnail response entity.

collectionIdstring or null

The identifier of the collection to which the site belongs. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
createdstring(date-time)

The date when the site was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the site. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
sortOrderinteger or null(int32)

Sort order of the site.

Example: 100
permissionsobject(Permissions)

The access rights of the current user to the site.

languagesArray of strings or null

The list of languages in use by the site.

Example: ["en-US","en-CA"]
hostsArray of objects or null(Host)

The list of hosts that the site resolves to.

supportedLanguagesArray of strings or null

The list of languages supported by Sitecore.

Example: ["en-US","en-CA"]
errorPagesobject(ErrorPages)

An object containing the site error pages

settingsobject or null

The settings for the site.

Example: {"thumbnailsRootPath":"/sitecore/media library/Project/sample-collection/sample-site","generateThumbnails":"true"}
propertiesobject or null

The read-only properties of the site.

Example: {"SxaSiteTemplate":"{E46F3AF2-39FA-4866-A157-7017C4B2A40C}","IsSxaSite":"true"}
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "skate-park", "description": "New site for Brand A in English-speaking countries", "displayName": "Skate Park Website", "thumbnail": { "url": "https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png", "rootPath": "sitecore/media library/Project/sample-collection/sample-site", "autogenerated": true }, "collectionId": "5aae1eeaea2440bf96f11f43da82c77b", "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf", "sortOrder": 100, "permissions": { "canAdmin": false, "canWrite": false, "canCreate": false, "canDelete": false, "canRename": false, "canRead": false, "canPublish": false, "canDuplicate": false }, "languages": [ "en-US", "en-CA" ], "hosts": [ {} ], "supportedLanguages": [ "en-US", "en-CA" ], "errorPages": { "errorPage": "string", "notFoundPage": "string" }, "settings": { "thumbnailsRootPath": "/sitecore/media library/Project/sample-collection/sample-site", "generateThumbnails": "true" }, "properties": { "SxaSiteTemplate": "{E46F3AF2-39FA-4866-A157-7017C4B2A40C}", "IsSxaSite": "true" } }

Delete a site

Request

Deletes a site, including its pages, settings, media files, data sources, presentation elements, dictionaries, components, variants, and page designs. Everyone in the environment will lose access to the deleted site. Deleting a site affects related websites in the collection: • If the site shares items with other sites, this might result in broken links. • Items that are cloned to other sites are turned into regular items, and the links removed.

Path
siteIdstringrequired

The identifier of the site.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
Query
forceboolean

If this is set to true, the site will be deleted even if it is published to Edge.

curl -i -X DELETE \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}?force=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
string
Response
application/json
"string"

Duplicate a site

Request

You can create a site by duplicating an existing one. When you duplicate a site, its content items (such as pages and images, folder structure, and links) are copied. Most of the settings are also copied, but you can change those later. The new site's path parameters and response body schema will be the same as the original site.

Path
siteIdstringrequired

The identifier of the site you want to duplicate.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
Bodyrequired

Input object containing the name and description of the new site

namestring[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$required

Name for the new site. Example value: skate-park

Default "string"
Example: "skate-park"
displayNamestring or null[ 0 .. 50 ] characters

Display name for the new site. Example value: Skate Park

Example: "Skate Park"
descriptionstring or null[ 0 .. 100 ] characters

Description for the new site. Example value: Sample showcase website description.

Example: "Sample showcase website description."
posMappingsArray of objects or null(AnalyticsIdentifier)

Analytics identifiers for the new site.

curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/copy' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "skate-park",
    "displayName": "Skate Park",
    "description": "Sample showcase website description.",
    "posMappings": [
      {
        "name": "skate-park",
        "language": "en"
      }
    ]
  }'

Responses

Successful operation

Bodyapplication/json
string
Response
application/json
"string"

Rename a site

Request

Changes the system name of a site.

Path
siteIdstringrequired

The identifier of the site you want to rename.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
Bodyrequired

Input object containing new name of the site

namestring[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$required

The new name for the site. Example value: new-site

Default "string"
Example: "new-site"
curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/rename' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "new-site"
  }'

Responses

Successful operation

Bodyapplication/json
string
Response
application/json
"string"

Sort sites

Request

By assigning a sort value to site IDs, you can use this endpoint to apply an order by which sites are sorted in the Sites user interface and in Content Editor. The lower the sort value, the higher the site appears in the interface.

Bodyrequired

A sites JSON object of key-value pairs where the site ID (string) is the key and the sort order (integer) is the value.

sitesobject or null

A collection containing site IDs and sort order.

Example: {"{43550C6A-2FFF-4DE6-B773-9133CEAF9099}":0,"{258D18A4-B06B-4CE6-95A7-C0D78574552B}":100,"{2C6B1648-E371-43B4-80F5-FAF4ECA43E48}":200}
curl -i -X POST \
  https://xmapps-api.sitecorecloud.io/api/v1/sites/sort \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sites": {
      "{43550C6A-2FFF-4DE6-B773-9133CEAF9099}": 0,
      "{258D18A4-B06B-4CE6-95A7-C0D78574552B}": 100,
      "{2C6B1648-E371-43B4-80F5-FAF4ECA43E48}": 200
    }
  }'

Responses

Sites sort order updated successfully

Response
application/json
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "Bad Request", "status": 400, "detail": "A detailed explanation, specific to this occurrence of the problem.", "instance": "If available, a URI reference that identifies the specific occurrence of the problem.", "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00", "errors": { "sampleProperty": [] } }

Validate site name

Request

Validates a site name to ensure it meets the required criteria. The validations applied to the site name:

  • Is a string and can't be null.
  • Is unique.
  • The length of the name is a maximum of 50 characters.
  • Can't start or end with a space.
  • Can't start with a dash.
  • Can include Latin alphanumeric characters, spaces and dashes.
Bodyrequired

The site name to validate.

namestring or null

The name of the site to validate. Example value: skate-park

Example: "skate-park"
curl -i -X POST \
  https://xmapps-api.sitecorecloud.io/api/v1/sites/name/validate \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "skate-park"
  }'

Responses

Returns a NameValidationResult indicating the validation result.

Bodyapplication/json
isValidboolean

indicates whether the name is valid.

messagestring or null

details about the request.

Response
application/json
{ "isValid": true, "message": "string" }

List sites that use an analytics identifier

Request

Path
analyticsIdentifierstringrequired

Analytics identifier.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/analytics-identifiers/{analyticsIdentifier}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring or null

The identifier of the site. Example value: 497f6eca-6276-4993-bfeb-53cbbbba6f08

Example: "497f6eca-6276-4993-bfeb-53cbbbba6f08"
namestring or null

The name of the site. Example value: skate-park

Example: "skate-park"
descriptionstring or null

The description of the site. Example value: New site for Brand A in English-speaking countries

Example: "New site for Brand A in English-speaking countries"
displayNamestring or null

The display name of the site. Example value: Skate Park Website

Example: "Skate Park Website"
thumbnailobject(Thumbnail)

The thumbnail response entity.

collectionIdstring or null

The identifier of the collection to which the site belongs. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
createdstring(date-time)

The date when the site was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the site. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
sortOrderinteger or null(int32)

Sort order of the site.

Example: 100
permissionsobject(Permissions)

The access rights of the current user to the site.

languagesArray of strings or null

The list of languages in use by the site.

Example: ["en-US","en-CA"]
hostsArray of objects or null(Host)

The list of hosts that the site resolves to.

supportedLanguagesArray of strings or null

The list of languages supported by Sitecore.

Example: ["en-US","en-CA"]
errorPagesobject(ErrorPages)

An object containing the site error pages

settingsobject or null

The settings for the site.

Example: {"thumbnailsRootPath":"/sitecore/media library/Project/sample-collection/sample-site","generateThumbnails":"true"}
propertiesobject or null

The read-only properties of the site.

Example: {"SxaSiteTemplate":"{E46F3AF2-39FA-4866-A157-7017C4B2A40C}","IsSxaSite":"true"}
]
Response
application/json
[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "skate-park", "description": "New site for Brand A in English-speaking countries", "displayName": "Skate Park Website", "thumbnail": {}, "collectionId": "5aae1eeaea2440bf96f11f43da82c77b", "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf", "sortOrder": 100, "permissions": {}, "languages": [], "hosts": [], "supportedLanguages": [], "errorPages": {}, "settings": {}, "properties": {} } ]

Unassign analytics identifiers from sites

Request

Removes the analytics identifiers from one or more sites.

Path
analyticsIdentifierstringrequired

Analytics identifier.

Bodyrequired

Input containing an array of site identifiers.

sitesIdentifiersArray of stringsrequired

The list of sites, based on their identifier, for which the analytic identifier should be unassigned.

curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/analytics-identifiers/{analyticsIdentifier}/detach' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sitesIdentifiers": [
      "string"
    ]
  }'

Responses

Success

Bodyapplication/json
boolean
Response
application/json
true

Retrieve the hierarchy of a site's main page

Request

Fetches hierarchy information about the main page of a site, including its children, ancestors, and siblings.

Path
siteIdstringrequired

The identifier of the site.

Query
languagestring

The ISO country-region language code for which to retrieve the hierarchy, for example: en-US, ar-AE.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hierarchy?language=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Site hierarchy retrieved successfully

Bodyapplication/json
pageobject(PageResponse)
childrenArray of objects or null(PageResponse)

Details of this page's children.

ancestorsArray of objects or null(PageResponse)

Details of this page's ancestors.

siblingsArray of objects or null(PageResponse)

Details of this page's siblings.

Response
application/json
{ "page": { "insertOptions": [], "hasVersions": true, "children": [], "id": "68900348a3b84eb8ac7df4d179c25727", "name": "Home", "displayName": "Site Home", "language": "en-US", "version": 1, "templateId": "6fe7d6551e3d4c2780105777f06c6c4f", "parentId": "4bc0c81a280b4b13890b7b074b9d68f4", "hasPresentation": true, "hasChildren": true, "permissions": {}, "locking": {}, "path": "Sitecore/Content/Home/Categories/Products/MyProduct" }, "children": [ {} ], "ancestors": [ {} ], "siblings": [ {} ] }

Retrieve the hierarchy of a page

Request

Fetches hierarchy information about a page, including its children, ancestors, and siblings.

Path
siteIdstringrequired

The identifier of the site.

pageIdstringrequired

Page identifier.

Query
languagestring

The ISO country-region language code for which to retrieve the hierarchy, for example: en-US, ar-AE.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hierarchy/{pageId}?language=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Page hierarchy retrieved successfully

Bodyapplication/json
pageobject(PageResponse)
childrenArray of objects or null(PageResponse)

Details of this page's children.

ancestorsArray of objects or null(PageResponse)

Details of this page's ancestors.

siblingsArray of objects or null(PageResponse)

Details of this page's siblings.

Response
application/json
{ "page": { "insertOptions": [], "hasVersions": true, "children": [], "id": "68900348a3b84eb8ac7df4d179c25727", "name": "Home", "displayName": "Site Home", "language": "en-US", "version": 1, "templateId": "6fe7d6551e3d4c2780105777f06c6c4f", "parentId": "4bc0c81a280b4b13890b7b074b9d68f4", "hasPresentation": true, "hasChildren": true, "permissions": {}, "locking": {}, "path": "Sitecore/Content/Home/Categories/Products/MyProduct" }, "children": [ {} ], "ancestors": [ {} ], "siblings": [ {} ] }

List ancestors for a page

Request

Fetches information about the ancestors of a page.

Path
siteIdstringrequired

The identifier of the site.

pageIdstringrequired

Page identifier.

Query
languagestring

The ISO country-region language code for which to retrieve the ancestors, for example: en-US, ar-AE.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hierarchy/{pageId}/ancestors?language=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of retrieved ancestor pages

Bodyapplication/jsonArray [
insertOptionsArray of objects or null(PageInsertOption)

Insert options for the page.

hasVersionsboolean

Indicates whether the page has versions in the queried language.

childrenArray of objects or null(PageResponse)

Children of the page.

idstring or null

The identifier of the page. Example value: 68900348a3b84eb8ac7df4d179c25727

Example: "68900348a3b84eb8ac7df4d179c25727"
namestring or null

The page's system name. Example value: Home

Example: "Home"
displayNamestring or null

The page's display name. Example value: Site Home

Example: "Site Home"
languagestring or null

The page language. Example value: en-US

Example: "en-US"
versioninteger(int32)

The current version of the page.

Example: 1
templateIdstring or null

The identifier of the template this page is based on. Example value: 6fe7d6551e3d4c2780105777f06c6c4f

Example: "6fe7d6551e3d4c2780105777f06c6c4f"
parentIdstring or null

The identifier of the page's parent. Example value: 4bc0c81a280b4b13890b7b074b9d68f4

Example: "4bc0c81a280b4b13890b7b074b9d68f4"
hasPresentationboolean

If set to true, this page can be rendered in the XM Cloud Pages application. This endpoint is set to false for the root item of the site, as well as for the folders if there are any.

Example: true
hasChildrenboolean

Whether the page has any child pages.

Example: true
permissionsobject(Permissions)

The access rights of the current user to the site.

lockingobject(PageLocking)
pathstring or null

The path for the page. Example value: Sitecore/Content/Home/Categories/Products/MyProduct

Example: "Sitecore/Content/Home/Categories/Products/MyProduct"
]
Response
application/json
[ { "insertOptions": [], "hasVersions": true, "children": [], "id": "68900348a3b84eb8ac7df4d179c25727", "name": "Home", "displayName": "Site Home", "language": "en-US", "version": 1, "templateId": "6fe7d6551e3d4c2780105777f06c6c4f", "parentId": "4bc0c81a280b4b13890b7b074b9d68f4", "hasPresentation": true, "hasChildren": true, "permissions": {}, "locking": {}, "path": "Sitecore/Content/Home/Categories/Products/MyProduct" } ]

List children for a page

Request

Fetches information about the children of a page.

Path
siteIdstringrequired

The identifier of the site.

pageIdstringrequired

Page identifier.

Query
languagestring

The ISO country-region language code for which to retrieve the children, for example: en-US, ar-AE.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hierarchy/{pageId}/children?language=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of retrieved child pages

Bodyapplication/jsonArray [
insertOptionsArray of objects or null(PageInsertOption)

Insert options for the page.

hasVersionsboolean

Indicates whether the page has versions in the queried language.

childrenArray of objects or null(PageResponse)

Children of the page.

idstring or null

The identifier of the page. Example value: 68900348a3b84eb8ac7df4d179c25727

Example: "68900348a3b84eb8ac7df4d179c25727"
namestring or null

The page's system name. Example value: Home

Example: "Home"
displayNamestring or null

The page's display name. Example value: Site Home

Example: "Site Home"
languagestring or null

The page language. Example value: en-US

Example: "en-US"
versioninteger(int32)

The current version of the page.

Example: 1
templateIdstring or null

The identifier of the template this page is based on. Example value: 6fe7d6551e3d4c2780105777f06c6c4f

Example: "6fe7d6551e3d4c2780105777f06c6c4f"
parentIdstring or null

The identifier of the page's parent. Example value: 4bc0c81a280b4b13890b7b074b9d68f4

Example: "4bc0c81a280b4b13890b7b074b9d68f4"
hasPresentationboolean

If set to true, this page can be rendered in the XM Cloud Pages application. This endpoint is set to false for the root item of the site, as well as for the folders if there are any.

Example: true
hasChildrenboolean

Whether the page has any child pages.

Example: true
permissionsobject(Permissions)

The access rights of the current user to the site.

lockingobject(PageLocking)
pathstring or null

The path for the page. Example value: Sitecore/Content/Home/Categories/Products/MyProduct

Example: "Sitecore/Content/Home/Categories/Products/MyProduct"
]
Response
application/json
[ { "insertOptions": [], "hasVersions": true, "children": [], "id": "68900348a3b84eb8ac7df4d179c25727", "name": "Home", "displayName": "Site Home", "language": "en-US", "version": 1, "templateId": "6fe7d6551e3d4c2780105777f06c6c4f", "parentId": "4bc0c81a280b4b13890b7b074b9d68f4", "hasPresentation": true, "hasChildren": true, "permissions": {}, "locking": {}, "path": "Sitecore/Content/Home/Categories/Products/MyProduct" } ]

List hosts for a site

Request

Retrieves the list of hosts for a site.

Path
siteIdstringrequired

The identifier of the site.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hosts' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Hosts retrieved successfully

Bodyapplication/jsonArray [
idstring or null

The host ID. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
namestring or null

The name of the site host. Example value: skate-park

Example: "skate-park"
hostnamesArray of strings or null

One or more hostnames.

Example: ["dev.skate-park.com","uat.skate-park.com"]
targetHostnamestring or null

The target hostname. Example value: www.skate-park.com

Example: "www.skate-park.com"
homePageIdstring or null

The identifier of the home page. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
renderingHostobject(RenderingHost)

The rendering host response entity.

permissionsobject(Permissions)

The access rights of the current user to the site.

settingsobject or null

The host settings collection.

Example: {"isSiteThumbnailSource":"true","sxaLinkable":"false"}
propertiesobject or null

Readonly host properties collection.

Example: {"siteDefinitionID":"{9004989A-E482-4587-B5C5-F9AECCD43565}","startItem":"/Home"}
analyticsIdentifiersobject or null

The list of analytics tracker identifiers mapped to the host, per language.

Example: [{"name":"skate-park","language":"en-US"}]
languageSettingsobject(SiteLanguageSettings)

The language settings of the host.

createdstring or null(date-time)

The date when the host was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the host. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
]
Response
application/json
[ { "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "skate-park", "hostnames": [], "targetHostname": "www.skate-park.com", "homePageId": "5aae1eeaea2440bf96f11f43da82c77b", "renderingHost": {}, "permissions": {}, "settings": {}, "properties": {}, "analyticsIdentifiers": [], "languageSettings": {}, "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf" } ]

Create a site host

Request

Creates a host for a site.

Path
siteIdstringrequired

The identifier of the site.

Bodyrequired

The parameters of a host.

namestring[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$required

The name of the new host. Example value: skate-park

Default "string"
Example: "skate-park"
hostnamesArray of strings or null

One or more hostnames.

Example: ["dev.skate-park.com","uat.skate-park.com"]
targetHostnamestring or null

The target hostname. Example value: www.skate-park.com

Example: "www.skate-park.com"
renderingHoststring or null

The rendering host. Example value: Default

Example: "Default"
homePageIdstring or null(?i)^(?:[({][0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?...

The identifier of the home page. Example value: 110d559fdea542ea9c1c8a5df7e70ef9

Example: "110d559fdea542ea9c1c8a5df7e70ef9"
thumbnailstring or null

The thumbnail information.

analyticsIdentifiersArray of objects or null(AnalyticsIdentifier)

The list of analytics tracker identifiers mapped to the host, per language.

settingsobject or null

The host settings collection.

languageSettingsobject(SiteLanguageSettings)

The language settings of the host.

curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hosts' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "skate-park",
    "hostnames": [
      "dev.skate-park.com",
      "uat.skate-park.com"
    ],
    "targetHostname": "www.skate-park.com",
    "renderingHost": "Default",
    "homePageId": "110d559fdea542ea9c1c8a5df7e70ef9",
    "thumbnail": "string",
    "analyticsIdentifiers": [
      {
        "name": "skate-park",
        "language": "en"
      }
    ],
    "settings": {
      "property1": "string",
      "property2": "string"
    },
    "languageSettings": {
      "defaultLanguage": "en",
      "languageEmbedding": false,
      "itemLanguageFallback": false,
      "fieldLanguageFallback": false
    }
  }'

Responses

Host created successfully

Bodyapplication/json
idstring or null

The host ID. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
namestring or null

The name of the site host. Example value: skate-park

Example: "skate-park"
hostnamesArray of strings or null

One or more hostnames.

Example: ["dev.skate-park.com","uat.skate-park.com"]
targetHostnamestring or null

The target hostname. Example value: www.skate-park.com

Example: "www.skate-park.com"
homePageIdstring or null

The identifier of the home page. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
renderingHostobject(RenderingHost)

The rendering host response entity.

permissionsobject(Permissions)

The access rights of the current user to the site.

settingsobject or null

The host settings collection.

Example: {"isSiteThumbnailSource":"true","sxaLinkable":"false"}
propertiesobject or null

Readonly host properties collection.

Example: {"siteDefinitionID":"{9004989A-E482-4587-B5C5-F9AECCD43565}","startItem":"/Home"}
analyticsIdentifiersobject or null

The list of analytics tracker identifiers mapped to the host, per language.

Example: [{"name":"skate-park","language":"en-US"}]
languageSettingsobject(SiteLanguageSettings)

The language settings of the host.

createdstring or null(date-time)

The date when the host was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the host. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
Response
application/json
{ "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "skate-park", "hostnames": [ "dev.skate-park.com", "uat.skate-park.com" ], "targetHostname": "www.skate-park.com", "homePageId": "5aae1eeaea2440bf96f11f43da82c77b", "renderingHost": { "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "Default", "appName": "Default", "layoutServiceConfiguration": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config", "serverSideRenderingEngineEndpointUrl": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render", "serverSideRenderingEngineApplicationUrl": "https://xmc-eh-uniqueid.sitecorecloud.io/" }, "permissions": { "canAdmin": false, "canWrite": false, "canCreate": false, "canDelete": false, "canRename": false, "canRead": false, "canPublish": false, "canDuplicate": false }, "settings": { "isSiteThumbnailSource": "true", "sxaLinkable": "false" }, "properties": { "siteDefinitionID": "{9004989A-E482-4587-B5C5-F9AECCD43565}", "startItem": "/Home" }, "analyticsIdentifiers": [ {} ], "languageSettings": { "defaultLanguage": "en", "languageEmbedding": false, "itemLanguageFallback": false, "fieldLanguageFallback": false }, "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf" }

Retrieve a site host by host ID

Request

Fetches details about a site host.

Path
siteIdstringrequired

The identifier of the site.

hostIdstringrequired

The identifier of the host.

curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hosts/{hostId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Returns the host found by the host ID

Bodyapplication/json
idstring or null

The host ID. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
namestring or null

The name of the site host. Example value: skate-park

Example: "skate-park"
hostnamesArray of strings or null

One or more hostnames.

Example: ["dev.skate-park.com","uat.skate-park.com"]
targetHostnamestring or null

The target hostname. Example value: www.skate-park.com

Example: "www.skate-park.com"
homePageIdstring or null

The identifier of the home page. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
renderingHostobject(RenderingHost)

The rendering host response entity.

permissionsobject(Permissions)

The access rights of the current user to the site.

settingsobject or null

The host settings collection.

Example: {"isSiteThumbnailSource":"true","sxaLinkable":"false"}
propertiesobject or null

Readonly host properties collection.

Example: {"siteDefinitionID":"{9004989A-E482-4587-B5C5-F9AECCD43565}","startItem":"/Home"}
analyticsIdentifiersobject or null

The list of analytics tracker identifiers mapped to the host, per language.

Example: [{"name":"skate-park","language":"en-US"}]
languageSettingsobject(SiteLanguageSettings)

The language settings of the host.

createdstring or null(date-time)

The date when the host was created. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
createdBystring or null

The ID of the user who created the host. Example value: L6kfw52ZVf

Example: "L6kfw52ZVf"
Response
application/json
{ "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "skate-park", "hostnames": [ "dev.skate-park.com", "uat.skate-park.com" ], "targetHostname": "www.skate-park.com", "homePageId": "5aae1eeaea2440bf96f11f43da82c77b", "renderingHost": { "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "Default", "appName": "Default", "layoutServiceConfiguration": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config", "serverSideRenderingEngineEndpointUrl": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render", "serverSideRenderingEngineApplicationUrl": "https://xmc-eh-uniqueid.sitecorecloud.io/" }, "permissions": { "canAdmin": false, "canWrite": false, "canCreate": false, "canDelete": false, "canRename": false, "canRead": false, "canPublish": false, "canDuplicate": false }, "settings": { "isSiteThumbnailSource": "true", "sxaLinkable": "false" }, "properties": { "siteDefinitionID": "{9004989A-E482-4587-B5C5-F9AECCD43565}", "startItem": "/Home" }, "analyticsIdentifiers": [ {} ], "languageSettings": { "defaultLanguage": "en", "languageEmbedding": false, "itemLanguageFallback": false, "fieldLanguageFallback": false }, "created": "2019-08-24T14:15:22Z", "createdBy": "L6kfw52ZVf" }

Update a host by host ID

Request

Modifies the properties of a host.

Path
siteIdstringrequired

The identifier of the site.

hostIdstringrequired

The identifier of the host.

Bodyrequired

New parameter values for the host.

namestring or null[ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$

Name of the host Example value: skate-park

Default "string"
Example: "skate-park"
hostnamesArray of strings or null

One or more hostnames.

Example: ["dev.skate-park.com","uat.skate-park.com"]
targetHostnamestring or null

The target hostname. Example value: www.skate-park.com

Example: "www.skate-park.com"
renderingHoststring or null

The rendering host. Example value: Default

Example: "Default"
homePageIdstring or null(?i)^(?:[({][0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?...

The identifier of the home page. Example value: 110d559fdea542ea9c1c8a5df7e70ef9

Example: "110d559fdea542ea9c1c8a5df7e70ef9"
thumbnailstring or null

The thumbnail information.

analyticsIdentifiersArray of objects or null(AnalyticsIdentifier)

The list of analytics tracker identifiers mapped to the host, per language.

settingsobject or null

The host settings collection.

languageSettingsobject(SiteLanguageSettings)

The language settings of the host.

curl -i -X PATCH \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hosts/{hostId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "skate-park",
    "hostnames": [
      "dev.skate-park.com",
      "uat.skate-park.com"
    ],
    "targetHostname": "www.skate-park.com",
    "renderingHost": "Default",
    "homePageId": "110d559fdea542ea9c1c8a5df7e70ef9",
    "thumbnail": "string",
    "analyticsIdentifiers": [
      {
        "name": "skate-park",
        "language": "en"
      }
    ],
    "settings": {
      "property1": "string",
      "property2": "string"
    },
    "languageSettings": {
      "defaultLanguage": "en",
      "languageEmbedding": false,
      "itemLanguageFallback": false,
      "fieldLanguageFallback": false
    }
  }'

Responses

Host updated successfully

Response
application/json
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "Bad Request", "status": 400, "detail": "A detailed explanation, specific to this occurrence of the problem.", "instance": "If available, a URI reference that identifies the specific occurrence of the problem.", "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00", "errors": { "sampleProperty": [] } }

Delete a site host by host ID

Request

Deletes a site using a hostID. Deletes a site, including its pages, settings, media files, data sources, presentation elements, dictionaries, components, variants, and page designs. Everyone in the environment will lose access to the deleted site.

Path
siteIdstringrequired

The identifier of the site.

hostIdstringrequired

The identifier of the host.

Query
forceboolean

If this is set to true, the host will be deleted even if it is published to Edge.

curl -i -X DELETE \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/hosts/{hostId}?force=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Host deleted successfully

Response
application/json
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "Bad Request", "status": 400, "detail": "A detailed explanation, specific to this occurrence of the problem.", "instance": "If available, a URI reference that identifies the specific occurrence of the problem.", "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00", "errors": { "sampleProperty": [] } }

List rendering hosts for a site

Request

Fetches a list of rendering hosts for a site.

Path
siteIdstringrequired

The identifier of the site.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
curl -i -X GET \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/renderinghosts' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring or null

The rendering host ID. Example value: 5aae1eeaea2440bf96f11f43da82c77b

Example: "5aae1eeaea2440bf96f11f43da82c77b"
namestring or null

The name of the rendering host. Example value: Default

Example: "Default"
appNamestring or null

The name of the app. Example value: Default

Example: "Default"
layoutServiceConfigurationstring or null

The server side rendering engine configuration URL. Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config

Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config"
serverSideRenderingEngineEndpointUrlstring or null

The server side rendering engine endpoint URL. Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render

Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render"
serverSideRenderingEngineApplicationUrlstring or null

The server side rendering engine application URL. Example value: https://xmc-eh-uniqueid.sitecorecloud.io/

Example: "https://xmc-eh-uniqueid.sitecorecloud.io/"
]
Response
application/json
[ { "id": "5aae1eeaea2440bf96f11f43da82c77b", "name": "Default", "appName": "Default", "layoutServiceConfiguration": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config", "serverSideRenderingEngineEndpointUrl": "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render", "serverSideRenderingEngineApplicationUrl": "https://xmc-eh-uniqueid.sitecorecloud.io/" } ]

List site templates

Request

Gets the site templates available in the environment that can be used for creating sites. Learn more about site templates.

curl -i -X GET \
  https://xmapps-api.sitecorecloud.io/api/v1/sites/templates \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring or null

The identifier of the site template. Example value: {5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}

Example: "{5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}"
namestring or null

The name of the site template. Example value: Basic

Example: "Basic"
enabledboolean

Indicates whenever the template is enabled.

Example: true
descriptionstring or null

The description of the site template. Example value: An example of a simple website with homepage, subpage, navigation, and footer.

Example: "An example of a simple website with homepage, subpage, navigation, and footer."
contentsArray of objects or null(StringStringKeyValuePair)

The summary of what pages, components, or integrations are included in the template.

createdBystring or null

The author of the site template.

updatedOnstring(date-time)

The date of the last update. Example value: 2019-08-24T14:15:22Z

Example: "2019-08-24T14:15:22Z"
thumbnailstring or null

The thumbnail of the site template. Example value: https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png?w=176

Example: "https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png?w=176"
imagestring or null

Large resolution screenshot of the site template. Example value: https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png

Example: "https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png"
]
Response
application/json
[ { "id": "{5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}", "name": "Basic", "enabled": true, "description": "An example of a simple website with homepage, subpage, navigation, and footer.", "contents": [], "createdBy": "string", "updatedOn": "2019-08-24T14:15:22Z", "thumbnail": "https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png?w=176", "image": "https://customer-tenant.sitecorecloud.io/-/media/Feature/JSS-Experience-Accelerator/Basic-Site/template-thumbnail.png" } ]

Upload a thumbnail for a site

Request

Path
siteIdstringrequired

The identifier of the site.

Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
Bodymultipart/form-data
ContentTypestring
ContentDispositionstring
Headersobject
Lengthinteger(int64)
Namestring
FileNamestring
curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}/upload-thumbnail' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F ContentType=string \
  -F ContentDisposition=string \
  -F 'Headers[property1][0]=string' \
  -F 'Headers[property2][0]=string' \
  -F Length=0 \
  -F Name=string \
  -F FileName=string

Responses

Successful operation

Bodyapplication/json
idstring or null

The thumbnail image ID. Example value: {5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}

Example: "{5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}"
namestring or null

Name of the uploaded image. Example value: skate-park-screenshot

Example: "skate-park-screenshot"
itemPathstring or null

The path to the media folder where thumbnail images are stored. Example value: sitecore/media library/Project/sample-collection/sample-site

Example: "sitecore/media library/Project/sample-collection/sample-site"
urlstring or null

URL of the image to be used as the thumbnail. Example value: https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png

Example: "https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png"
Response
application/json
{ "id": "{5AAE1EEA-EA24-40BF-96F1-1F43DA82C77B}", "name": "skate-park-screenshot", "itemPath": "sitecore/media library/Project/sample-collection/sample-site", "url": "https://xmc-customer-tenant.sitecorecloud.io/-/media/Project/sample-collection/sample-site/System/7/0/B/C/thumbnail_70BC64BDE257400E82BFDB3344797DB7.png" }

Collections

Site collections are used to group related sites together. The Collections API enables authorized developers to manage site collections.

Operations

Jobs

The Jobs API allows callers to manage running background jobs.

Operations

Languages

XM Cloud supports creating content and websites in multiple languages. The default language is English, but you can add any number of languages to your environment, languages that you can select amongst the predefined languages that are supported by Sitecore XM Cloud. Sitecore supports all the languages available in the .NET CultureInfo class. A predefined language in XM Cloud follows the ISO code and combines both language and country or region, for example, en-AU or English(Australia).

Operations