Note: the information on this page is mainly of historical interest. Please refer to the README for up to date information.
Oak comes with an HTTP binding that allows you to access and modify content in the repository. Ultimately our goal is to expose all repository operations through this interface.
NOTE: This page is a work in progress. Feel free to contribute!
Basic content access
Creating a new node:
$ curl -d foo=bar http://localhost:8080/test
Accessing an existing node:
$ curl http://localhost:8080/test {"foo":"bar"}
Namespace registry
Registering a new namespace:
$ curl -d foo=http://foo.example.com/ns http://localhost:8080/jcr:system/jcr:namespaces
Retrieving the currently registered namespaces:
$ curl http://localhost:8080/jcr:system/jcr:namespaces {"foo":"http://foo.example.com/ns"}
SPI coverage
The following table maps methods of the Jackrabbit 2.x SPI interfaces to functionally equivalent Oak HTTP features.
SPI method |
Oak HTTP |
|
Items are identified by path |
|
Names are strings |
|
Paths are strings |
|
Values are JSON values, with extra type information |
|
Not relevant, use HTTP-level or client-side caching |
|
GET /jcr:system/jcr:descriptors |
|
Not relevant, credentials passed on each request |
|
Not relevant, credentials passed on each request |
|
Not relevant, there is no session to dispose |
... |
... |