CRUD content via rest api

Hello
I want to create some new content like new document via rest api. Is there any rest api like POST api/content/documents or api/content/gallery to save new document or image in the cms?
I see this post but I want some api like this for managing all entity like node, property, user and group. This plugin did not compatible with bloomreach 13. Is there a similar one for bloomreach 13? If no how can I write some api like this?
Thanks.

Hi,

You have two options to implement and expose JAX-RS based REST services:

  • Repository JAX-RS Service [1]
  • Plain JAX-RS Services [2]

The former one is deployed on /cms application, whereas the latter is on /site application. The former with built-in Basic authentication, the latter without built-in authentication - but you can add authentication through Spring Security and integration addon module [3] for example.

REST endpoints allow you to expose URLs, input and output params, so you need to use a API or library to create documents in repository. Content-EXIM [4] is a good library in any choices. For example, the groovy code example with the library [5] is a good source to reuse.

Regards,

Woonsan

[1] https://documentation.bloomreach.com/library/concepts/hippo-services/repository-jaxrs-service.html
[2] https://documentation.bloomreach.com/library/concepts/rest/restful-api-support---plain-jax-rs-services.html
[3] https://bloomreach-forge.github.io/hst-spring-security/
[4] https://bloomreach-forge.github.io/content-export-import/
[5] https://bloomreach-forge.github.io/content-export-import/tutorials-import-docs.html

Thanks.
For adding repository jaxrs service I add new module and a class like documentation. After build and run project, the api return

No service was found

I add the new maven module in root of project. Then add the provided dependency and api class. Is there any sample project?

Perhaps there are better ones, but I have this: Content EXIM Built-in REST Services

Click on “Fork me on GitHub” ribbon and browse the “repository-jaxrs” submodule.

Regards,

Woonsan