The Sites API collection has new endpoints, parameters, and validation to help you to better manage your XM Cloud sites and site collections:
New endpoints for validating the names of sites (
/api/v1/sites/name/validate
) and site collections (/api/v1/collections/name/validate
) . These endpoints return either a success message or details of the validation failure.New endpoints for changing the sort order of sites (
/api/v1/sites/sort
) and site collections (/api/v1/collections/sort
) in Content Editor, Pages, and API responses.A new endpoint that returns a list of the editing hosts you can assign to a site (
/api/v1/sites/{siteId}/renderinghosts
).A new
language
parameter for the various hierarchy endpoints, allowing you to retrieve the hierarchy of a site for a specific ISO country-region language code. Also, the response for those endpoints now includes achildren
object.A new
errorPages
object includes theerrorPage
andnotFoundPage
properties, which you use to define the error pages of the site when sending aPATCH
request to/sites/{siteID}
to update a site.New validation to ensure that a site collection exists before any attempt to update it by sending a
PATCH
request to the/api/v1/collections/{collectionId}
endpoint. If the specified collection doesn’t exist, the request now returns a 404 response.For the sake of consistency, all XM Apps endpoints now use the
permissions
property to designate access rights. Previously, theaccess
property was used for some endpoints, instead. For backward compatibility,access
is still supported, but we recommend only usingpermissions
.