Save a page layout

Request

Updates the layout of a page.

Security
Bearer
Path
pageIdstringrequired

The page identifier.

Example:8f0b81bc-7388-46be-b109-6e73d1114470
Query
environmentIdstring

The identifier of the environment.

Example:environmentId=main
Body

Input data containing layout of the page

languagestring, non-emptyrequired

The language of the page to save. Example value: en-US

Example:"en-US"
layoutobject(PageLayout)required
sitestring, non-emptyrequired

The site name. Example value: my-site

Example:"my-site"
originalLayoutobject(PageLayout)
pageVersioninteger, (int32)

The version number of the page to save. Example value: 2

Example:2
revisionstring or null

The revision identifier of the page to save. Example value: f7d29433-001e-4a35-a744-876759dba468

Example:"f7d29433-001e-4a35-a744-876759dba468"
curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/pages/8f0b81bc-7388-46be-b109-6e73d1114470/layout?environmentId=main' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "layout": {
      "kind": "Final",
      "body": "{\"devices\":[{\"id\":\"fe5d7fdf-89c0-4d99-9aa3-b5fbd009c9f3\",\"layoutId\":\"96e5f4ba-a2cf-4a4c-a4e7-64da88226362\",\"placeholders\":[],\"renderings\":[{\"id\":\"9c6d53e3-fe57-4638-af7b-6d68304c7a94\",\"instanceId\":\"ad5e15fb-896b-4415-8735-5e4d6b1543e1\",\"placeholderKey\":\"headless-main\",\"dataSource\":\"local:/Data/Text 1\",\"parameters\":{\"GridParameters\":\"{7465D855-992E-4DC2-9855-A03250DFA74B}\",\"FieldNames\":\"{940B57D1-13EA-429D-8C7E-2F6C1307B1B1}\",\"Styles\":\"\",\"RenderingIdentifier\":\"\",\"CSSStyles\":\"\",\"DynamicPlaceholderId\":\"1\"}}]}]}"
    },
    "originalLayout": {
      "kind": "Final",
      "body": "{\"devices\":[{\"id\":\"fe5d7fdf-89c0-4d99-9aa3-b5fbd009c9f3\",\"layoutId\":\"96e5f4ba-a2cf-4a4c-a4e7-64da88226362\",\"placeholders\":[],\"renderings\":[{\"id\":\"9c6d53e3-fe57-4638-af7b-6d68304c7a94\",\"instanceId\":\"ad5e15fb-896b-4415-8735-5e4d6b1543e1\",\"placeholderKey\":\"headless-main\",\"dataSource\":\"local:/Data/Text 1\",\"parameters\":{\"GridParameters\":\"{7465D855-992E-4DC2-9855-A03250DFA74B}\",\"FieldNames\":\"{940B57D1-13EA-429D-8C7E-2F6C1307B1B1}\",\"Styles\":\"\",\"RenderingIdentifier\":\"\",\"CSSStyles\":\"\",\"DynamicPlaceholderId\":\"1\"}}]}]}"
    },
    "language": "en-US",
    "site": "my-site",
    "pageVersion": 2,
    "revision": "f7d29433-001e-4a35-a744-876759dba468"
  }'

Responses

Success

Bodyapplication/json
errorsArray of objects or null(SavePageError)

The list of errors that occurred during the save operation.

savedPageobject(SavedPage)
validationErrorsArray of objects or null(PageValidationError)

The list of validation errors that occurred during the save operation.

warningsArray of strings or null

The list of warnings that occurred during the save operation.

newCreatedVersionobject(PageVersionInfo)
Response
{ "errors": [ { … } ], "savedPage": { "fields": [ … ], "id": "8f0b81bc-7388-46be-b109-6e73d1114470", "language": "en-US", "revision": "f7d29433-001e-4a35-a744-876759dba468", "version": 2 }, "validationErrors": [ { … } ], "warnings": [ "string" ], "newCreatedVersion": { "pageId": "8f0b81bc-7388-46be-b109-6e73d1114470", "displayName": "Site Home", "versionNumber": 2 } }