Skip to main content

Templates specifications

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

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

Endpoint Overview

  • Endpoint Name: Templates
  • Method: GET
  • URL: /cms/api/templates

Authentication

  • Authentication Type: Shared Secret

  • Pass the Secret in the request header using the following authentication schema::

    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 template definitions.

Successful Response Example

[
{
"key": {
"id": "default",
"namespace": "urn:sample-templates"
},
"slots": [
"main"
],
"design": {
"rows": [
{
"columns": [
{
"elementType": 1,
"name": "header",
"description": "",
"width": 100,
"rows": []
}
]
},
{
"columns": [
{
"elementType": 0,
"name": "main",
"description": "",
"width": 100,
"rows": []
}
]
},
{
"columns": [
{
"elementType": 1,
"name": "footer",
"description": "",
"width": 100,
"rows": []
}
]
}
]
},
"label": "default"
}
]

Common Errors and Troubleshooting

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

  • ...