Ulbora Headless CMS is a CMS that can provide content that can be used anywhere.
- Content-Type: application/json (for POST and PUT)
- Authorization: Bearer aToken (POST, PUT, and DELETE. No token required for get services.)
- clientId: clientId (example 33477)
POST:
URL: http://localhost:3008/rs/content/add
Example Request
{
"title":"new title for insert",
"category": "books",
"text":"some text",
"hits": 100,
"metaAuthorName": "ken",
"metaDesc": "ken",
"metaKeyWords": "ulbora, content, microservice",
"metaRobotKeyWords": "ulbora, content, microservice"
}
Example Response
{
"success": true,
"id": 19
}
PUT:
URL: http://localhost:3008/rs/content/update
Example Request
{
"id": 11,
"title":"new title for insert for ken with oauth again",
"category": "Books",
"text":"some text",
"hits": 100,
"metaAuthorName": "ken",
"metaDesc": "ken",
"metaKeyWords": "ulbora, content, microservice",
"metaRobotKeyWords": "ulbora, content, microservice"
}
Example Response
{
"success": true,
"id": 11
}
PUT:
URL: http://localhost:3008/rs/content/hits
Example Request
{
"id": 11,
"hits": 101
}
Example Response
{
"success": true,
"id": 11
}
GET:
URL: http://localhost:3008/rs/content/get/11/403
Example Response
{
"id": 11,
"title": "new title for insert for ken with oauth again",
"category": "Guns",
"createDate": "2017-08-15T01:09:36Z",
"modifiedDate": "2017-08-15T01:13:55Z",
"hits": 100,
"metaAuthorName": "ken",
"metaDesc": "ken",
"metaKeyWords": "ulbora, content, microservice",
"metaRobotKeyWords": "ulbora, content, microservice",
"text": "some text",
"clientId": 403
}
GET:
URL: http://localhost:3008/rs/content/list/403
Example Response
[
{
"id": 11,
"title": "new title for insert for ken with oauth again",
"category": "Guns",
"createDate": "2017-08-15T01:09:36Z",
"modifiedDate": "2017-08-15T01:13:55Z",
"hits": 100,
"metaAuthorName": "ken",
"metaDesc": "ken",
"metaKeyWords": "ulbora, content, microservice",
"metaRobotKeyWords": "ulbora, content, microservice",
"text": "some text",
"clientId": 403
},
{
"id": 14,
"title": "new title for insert",
"category": "books",
"createDate": "2017-08-15T01:23:45Z",
"modifiedDate": "0001-01-01T00:00:00Z",
"hits": 100,
"metaAuthorName": "ken",
"metaDesc": "ken",
"metaKeyWords": "ulbora, content, microservice",
"metaRobotKeyWords": "ulbora, content, microservice",
"text": "some text",
"clientId": 403
}
]
DELETE:
URL: http://localhost:3008/rs/content/delete/14
Example Response
{
"success": true,
"id": 15
}
docker run --network=ulbora_bridge --name content --log-opt max-size=50m --env DATABASE_HOST=someHost /
--env DATABASE_USER_NAME=someUser --env DATABASE_USER_PASSWORD=somePw --env DATABASE_NAME=ulbora_content_service /
--env DATABASE_POOL_SIZE=5 --env OAUTH2_VALIDATION_URI=http://oauth2:8080/rs/token/validate /
--env --restart=always -d ulboralabs/content sh