REST APIs

Last Updated: Mar 26, 2024
documentation for the dotCMS Content Management System

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 APIDescription
ContainersProvides CRUD control over Containers.
Content TypesEnables management of Content Types.
ContentProvides full CRUD operations on dotCMS content of any type.
ElasticsearchEnables full JSON Elasticsearch queries against the dotCMS content repository.
Elasticsearch IndexingManages Elasticsearch indexes for your dotCMS content repository.
Image ProcessingAllows 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 PropertiesEnables retrieval of properties and variables for configured Languages.
NavigationRetrieves navigation content and structures.
Pages and LayoutsRetrieves content as it is displayed in containers and on Pages (with full formatting and/or within the layout of the Page).
Role PermissionsAllows retrieval of user roles and permissions.
RulesAllows updating and evaluation of Rules, including Rule Conditions and Rule Actions.
WidgetsAllows evaluation of Widget code directly (without displaying the Widget on a Page).
WorkflowsEnables 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
ParameterValue
filterA filter string, similar to a search query; can yield partial hits
pagePage number
per_pageNumber of results to display per page
orderbyName of result field by which to sort
directionASC or DESC for ascending or descending
hostThe identifier of the associated host
systemtrue 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
    }
}

On this page

×

We Dig Feedback

Selected excerpt:

×