- Update a site
Updates various parameters of a site. To change the name of a site, see rename a site.
Various site configuration properties
The display name for the site. Example value: Skate Park Site
The description for the site. Example value: New site for Brand A in English-speaking countries.
The list of languages supported by Sitecore. Example value: [ "en-US", "en-CA" ]
[ "en-US", "en-CA" ]
The identifier of the brand kit associated with this site. Example value: e3f1c5a2-4b6d-4a3e-9f1b-2d3c4b5a6e7f
Whether the thumbnail should be reset. True - thumbnail will be reset to automatic. False - thumbnail will not be reset. Example value: True
The list of text editor profiles associated with the site. Example value: [ "e2102e93-424a-4a99-a066-7750dbf41b28", "530f7907-6eec-4b7a-9fcc-98aef2719232" ]
[ "e2102e93-424a-4a99-a066-7750dbf41b28", "530f7907-6eec-4b7a-9fcc-98aef2719232" ]
- Production serverhttps://xmapps-api.sitecorecloud.io/api/v1/sites/{siteId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json
- text/json
- application/*+json
import fetch from 'node-fetch';
async function run() {
const query = new URLSearchParams({environmentId: 'main'}).toString();
const siteId = '497f6eca-6276-4993-bfeb-53cbbbba6f08';
const resp = await fetch(
`https://xmapps-api.sitecorecloud.io/api/v1/sites/${siteId}?${query}`,
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
},
body: JSON.stringify({
displayName: 'Skate Park Site',
description: 'New site for Brand A in English-speaking countries.',
supportedLanguages: ['en-US', 'en-CA'],
shared: true,
errorPages: {
errorPage: 'c5a2fe31-46bd-34ae-91fb-d3c24b5a6e7f',
notFoundPage: 'a2fc5e31-6b4d-a43e-9f1b-c2d34b5a6e7f'
},
sortOrder: 100,
targetHostname: 'skatepark.local',
brandKitId: 'e3f1c5a2-4b6d-4a3e-9f1b-2d3c4b5a6e7f',
resetThumbnail: true,
editorProfiles: [
'e2102e93-424a-4a99-a066-7750dbf41b28',
'530f7907-6eec-4b7a-9fcc-98aef2719232'
]
})
}
);
const data = await resp.json();
console.log(data);
}
run();Success
The identifier of the site. Example value: 497f6eca-6276-4993-bfeb-53cbbbba6f08
The description of the site. Example value: New site for Brand A in English-speaking countries
The display name of the site. Example value: Skate Park Website
The identifier of the collection to which the site belongs. Example value: 5aae1eeaea2440bf96f11f43da82c77b
The date when the site was created. Example value: 2019-08-24T14:15:22Z
The ID of the user who created the site. Example value: L6kfw52ZVf
The identifier of the brand kit associated with this site. Example value: e3f1c5a2-4b6d-4a3e-9f1b-2d3c4b5a6e7f
The list of languages in use by the site. Example value: [ "en-US", "en-CA" ]
[ "en-US", "en-CA" ]
The list of languages supported by Sitecore. Example value: [ "en-US", "en-CA" ]
[ "en-US", "en-CA" ]
The settings for the site.
{ "thumbnailsRootPath": "/sitecore/media library/Project/sample-collection/sample-site", "generateThumbnails": "true" }
{ "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, "brandKitId": "e3f1c5a2-4b6d-4a3e-9f1b-2d3c4b5a6e7f", "permissions": { "canAdmin": false, "canWrite": false, "canCreate": false, "canDelete": false, "canRename": false, "canRead": false, "canPublish": false, "canDuplicate": false, "canWriteLanguage": false }, "languages": [ "en-US", "en-CA" ], "hosts": [ { … } ], "supportedLanguages": [ "en-US", "en-CA" ], "errorPages": { "errorPage": "c5a2fe31-46bd-34ae-91fb-d3c24b5a6e7f", "notFoundPage": "a2fc5e31-6b4d-a43e-9f1b-c2d34b5a6e7f" }, "errorPagesConfiguration": { "errorPage": { … }, "notFoundPage": { … } }, "settings": { "thumbnailsRootPath": "/sitecore/media library/Project/sample-collection/sample-site", "generateThumbnails": "true" }, "properties": { "SxaSiteTemplate": "{E46F3AF2-39FA-4866-A157-7017C4B2A40C}", "IsSxaSite": "true" } }