Skip to main content

REST API Reference

Shio CMS exposes a comprehensive REST API for content management, search, and administration. All endpoints use JSON for request and response bodies.


Authentication

Most API endpoints require authentication. Shio CMS uses session-based authentication with CSRF token protection.

Login

POST /api/v2/auth/login
Content-Type: application/json

{
"username": "admin",
"password": "admin"
}

CSRF Token

For write operations (POST, PUT, DELETE), include the CSRF token in the X-XSRF-TOKEN header. The token is returned as a cookie (XSRF-TOKEN) after successful authentication.


API Base Path

All endpoints are prefixed with /api/v2.


Content Endpoints

Posts

MethodPathDescription
GET/api/v2/post/{id}Get a post by ID
POST/api/v2/postCreate a new post
PUT/api/v2/post/{id}Update a post
DELETE/api/v2/post/{id}Delete a post

Get Post

GET /api/v2/post/{id}

Response:

{
"id": "post-uuid",
"title": "My Post",
"summary": "Post summary",
"postType": "Text",
"folder": "folder-uuid",
"attributes": {
"title": "My Post",
"description": "Post content..."
},
"publishStatus": "PUBLISHED",
"date": "2026-03-27T10:00:00"
}

Post Types

MethodPathDescription
GET/api/v2/post-typeList all Post Types
GET/api/v2/post-type/{id}Get a Post Type by ID
POST/api/v2/post-typeCreate a new Post Type
PUT/api/v2/post-type/{id}Update a Post Type
DELETE/api/v2/post-type/{id}Delete a Post Type

Post Type Attributes

MethodPathDescription
GET/api/v2/post-type/{id}/attrList attributes for a Post Type
POST/api/v2/post-type/{id}/attrAdd an attribute to a Post Type
PUT/api/v2/post-type/{id}/attr/{attrId}Update an attribute
DELETE/api/v2/post-type/{id}/attr/{attrId}Delete an attribute

Folder Endpoints

MethodPathDescription
GET/api/v2/folder/{id}Get a folder by ID
POST/api/v2/folderCreate a new folder
PUT/api/v2/folder/{id}Update a folder
DELETE/api/v2/folder/{id}Delete a folder

Site Endpoints

MethodPathDescription
GET/api/v2/siteList all sites
GET/api/v2/site/{id}Get a site by ID
POST/api/v2/siteCreate a new site
PUT/api/v2/site/{id}Update a site
DELETE/api/v2/site/{id}Delete a site

Search Endpoint

MethodPathDescription
GET/api/v2/searchFull-text search across content

Query Parameters:

ParameterDescription
qSearch query string
siteSite ID to scope the search

User Management Endpoints

Users

MethodPathDescription
GET/api/v2/userList all users
GET/api/v2/user/{username}Get a user
POST/api/v2/userCreate a new user
PUT/api/v2/user/{username}Update a user
DELETE/api/v2/user/{username}Delete a user

Groups

MethodPathDescription
GET/api/v2/groupList all groups
GET/api/v2/group/{id}Get a group
POST/api/v2/groupCreate a new group
PUT/api/v2/group/{id}Update a group
DELETE/api/v2/group/{id}Delete a group

Roles

MethodPathDescription
GET/api/v2/roleList all roles
GET/api/v2/role/{id}Get a role
POST/api/v2/roleCreate a new role
PUT/api/v2/role/{id}Update a role
DELETE/api/v2/role/{id}Delete a role

Widget Endpoints

MethodPathDescription
GET/api/v2/widgetList all widgets
GET/api/v2/widget/{id}Get a widget
POST/api/v2/widgetCreate a widget
PUT/api/v2/widget/{id}Update a widget
DELETE/api/v2/widget/{id}Delete a widget

Workflow Endpoints

MethodPathDescription
GET/api/v2/workflowList workflow tasks
GET/api/v2/workflow/{id}Get a workflow task
POST/api/v2/workflowCreate a workflow task
PUT/api/v2/workflow/{id}Update a workflow task

File Upload Endpoints

MethodPathDescription
POST/api/v2/static-file/{folderId}Upload a static file to a folder

Request: multipart/form-data with file attachment.

note

Maximum file upload size is 1024 MB (configurable via spring.servlet.multipart.max-file-size).


History Endpoint

MethodPathDescription
GET/api/v2/history/{objectId}Get change history for an object

Reference Endpoints

MethodPathDescription
GET/api/v2/reference/{id}Get references for an object

Object Endpoints

MethodPathDescription
GET/api/v2/object/{id}Get any object by ID (folder, post, or file)

Preview Endpoint

MethodPathDescription
GET/api/v2/preview/{id}Preview content rendering

Import / Export Endpoints

MethodPathDescription
POST/api/v2/importImport a site or content package

Provider Endpoints

Exchange Providers

MethodPathDescription
GET/api/v2/provider/exchangeList exchange providers
GET/api/v2/provider/exchange/{id}Get an exchange provider

Auth Providers

MethodPathDescription
GET/api/v2/provider/authList auth providers
GET/api/v2/provider/auth/{id}Get an auth provider

Stock Photo Endpoint

MethodPathDescription
GET/api/v2/stock-photoSearch stock photos

Website Endpoints

These endpoints are publicly accessible (no authentication required):

PathDescription
/sites/{siteName}/{path}Access the published website
/__tur/sn/{siteName}Turing ES search proxy

PageDescription
GraphQLQuery content using GraphQL
Developer GuideDev environment and API usage
SecurityAuthentication and authorization