API

The API is a multi-purpose API and the centerpiece of Chautec CMS.
 

API diagram


Chautec CMS's API aims to keep its JSON simple and low cost by using the same data structure for everything.
Yes, literally everything from a Page to a CSS file is composed of the same structure referred to as “components”.


Abstract components
API abstract components
Component types
API component types


Pre-defined component types (e.g. Menu, Page, Block) are available to help you build a website using Site easier. At the same time, the flexibility of the system is that you can define your own “componentType” for whatever purpose.

There is no limit to the depth of child components. API consumers simply call which component to retrieve and specify how many levels of child components to return.
Refer to the API Documentation for more about this.

Spaces

Spaces are not necessarily just a website. They are a virtual separation for serving different purposes using the same Chautec CMS instance.

Example:

Dogs
(space 1)
Cats
(space 2)
Cars
(space 3)
WebsiteWebsite3rd party integration
Mobile app-Alexa app

 

Each space has a folder component with the reserved key “root” which all the space's components must fall under.

Components have a unique ID across all spaces. However, their key is only unique within each space making it easier to query for.

Publishing and previewing

There is no complicated publishing mechanism in Chautec CMS. A simple “published” boolean indicates whether the component will be available to the public.

Only authenticated users are able to call for unpublished components or see unpublished child components.

Asset endpoints

Although even assets such as stylesheets, JavaScript, XML and binary files are represented in their JSON component form, there are useful endpoints to directly use them with automatic MIME type detection.

API asset endpoints