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

RepositoryService.getIdFactory()

Items are identified by path

RepositoryService.getNameFactory()

Names are strings

RepositoryService.getPathFactory()

Paths are strings

RepositoryService.getQValueFactory()

Values are JSON values, with extra type information

RepositoryService.getItemInfoCache()

Not relevant, use HTTP-level or client-side caching

RepositoryService.getRepositoryDescriptors()

GET /jcr:system/jcr:descriptors

RepositoryService.obtain()

Not relevant, credentials passed on each request

RepositoryService.impersonate()

Not relevant, credentials passed on each request

RepositoryService.dispose()

Not relevant, there is no session to dispose

...

...

Oak-over-HTTP (last edited 2014-06-27 09:32:57 by MichaelDürig)