Skip to main content

Layouts specifications

The following specifications instruct on how to develop the endpoint that returns the layout definitions for a specific page type.

NOTE: This endpoint relates to the page type through its base URL.

Endpoint Overview

  • Endpoint Name: Layouts
  • Method: GET
  • URL: /cms/api/layouts

Authentication

  • Authentication Type: Shared Secret

  • Pass the Secret in the request header:

    Authorization: CMS key=YOUR_SHARED_SECRET_VALUE

Request

Headers

Header NameRequiredDescription
AuthorizationYesCMS key=YOUR_SHARED_SECRET_VALUE
acceptNoapplication/json

Path Parameters

None.

Query Parameters

None.

Request body

None.

Response

Response Codes

Standard HTTP status codes.

Response Body

Array of layout definitions.

Successful Response Example

[
{
"key": {
"id": "externalTwoColumnsLayout",
"namespace": "urn:external-layouts"
},
"label": "External - 2 Columns fluid",
"description": "It allows to add two columns with variable width",
"slots": [
"leftContent",
"rightContent"
],
"design": {
"rows": [
{
"columns": [
{
"elementType": 2,
"name": null,
"description": null,
"width": 50,
"rows": [
{
"columns": [
{
"elementType": 0,
"name": "leftContent",
"description": "",
"width": 100,
"rows": []
}
]
}
]
},
{
"elementType": 2,
"name": null,
"description": null,
"width": 50,
"rows": [
{
"columns": [
{
"elementType": 0,
"name": "rightContent",
"description": "",
"width": 100,
"rows": []
}
]
}
]
}
]
}
]
}
}
]

Common Errors and Troubleshooting

In case of failure, check the Forge logs for error details. For transient errors retry again the operation.

  • ...