https://github.com/ulbora/ulboracontentservice
Ulbora Headless CMS
https://github.com/ulbora/ulboracontentservice
headless-cms microservice
Last synced: 3 months ago
JSON representation
Ulbora Headless CMS
- Host: GitHub
- URL: https://github.com/ulbora/ulboracontentservice
- Owner: Ulbora
- License: agpl-3.0
- Created: 2016-10-29T17:52:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T22:40:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-21T18:32:54.075Z (over 1 year ago)
- Topics: headless-cms, microservice
- Language: Go
- Homepage:
- Size: 10.4 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/Ulbora/UlboraContentService)
Ulbora Headless CMS
==============
## [Free Account](http://www.register.myapigateway.com/?ulboraCms=true)
Ulbora Headless CMS is a CMS that can provide content that can be used anywhere.
## Headers
- 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)
## Add Content
```
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
}
```
## Update Content
```
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
}
```
## Update Content Hits
```
PUT:
URL: http://localhost:3008/rs/content/hits
Example Request
{
"id": 11,
"hits": 101
}
```
```
Example Response
{
"success": true,
"id": 11
}
```
## Get Content
```
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 Content By Client
```
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 Content
```
DELETE:
URL: http://localhost:3008/rs/content/delete/14
```
```
Example Response
{
"success": true,
"id": 15
}
```
# Docker usage
```
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
```