dotCMS includes native REST APIs which enable you to create, read, and manage almost all types of objects within the dotCMS system through a RESTful interface.
List of REST APIs
REST API | Description |
---|---|
Containers | Provides CRUD control over Containers. |
Content Types | Enables management of Content Types. |
Content | Provides full CRUD operations on dotCMS content of any type. |
Elasticsearch | Enables full JSON Elasticsearch queries against the dotCMS content repository. |
Elasticsearch Indexing | Manages Elasticsearch indexes for your dotCMS content repository. |
Image Processing | Allows you to perform dynamic, on-the-fly editing of images without sacrificing performance. This enabes storage of a single image, which can then be modified appropriately at run-time depending on how and where the image is displayed. |
Language Properties | Enables retrieval of properties and variables for configured Languages. |
Navigation | Retrieves navigation content and structures. |
Pages and Layouts | Retrieves content as it is displayed in containers and on Pages (with full formatting and/or within the layout of the Page). |
Role Permissions | Allows retrieval of user roles and permissions. |
Rules | Allows updating and evaluation of Rules, including Rule Conditions and Rule Actions. |
Widgets | Allows evaluation of Widget code directly (without displaying the Widget on a Page). |
Workflows | Enables management of Workflows and triggering of Workflow Actions. |
Standard Pagination Parameters
For many APIs that return multiple results, an additional set of parameters is available to control the presentation of results, added to the end of the API call. For example:
api/v1/container?filter=FOO&page=3&per_page=5
Parameter | Value |
---|---|
filter | A filter string, similar to a search query; can yield partial hits |
page | Page number |
per_page | Number of results to display per page |
orderby | Name of result field by which to sort |
direction | ASC or DESC for ascending or descending |
host | The identifier of the associated host |
system | true or false |
These parameters can be used with the following APIs:
- Apps
- Categories
- Containers
- Content Types
- Pages
- Relationships
- Sites
- Templates
- Themes
- Users
In the responses, pagination parameters appear in headers and, beginning with 23.05, are also included in data payloads. The latter redundancy was adopted for compatibility, allowing the use of the API across proxies that may remove headers.
The returned JSON object's top-level property pagination
includes the data in the manner of the schema below:
{
"entity": [...],
"pagination": {
"currentPage": 1,
"perPage": 30,
"totalEntries": 65
}
}