Development Resources

REST API

REST API

Note: This API is ALPHA and subject to change as we get feedback from early users.

The REST Service

A Datomic peer can be run as a standalone HTTP service using the bin/rest command:

bin/rest -p port [-o origins]? [alias uri]+

The URIs are as described in the documentation for connect with the database name elided, e.g. datomic:mem:// or datomic:ddb://aws-region/ddb-table?aws_access_key_id=XXX&aws_secret_key=YYY/. Clients of the REST API will use the supplied storage aliases to talk about the storages, and will be unaware of the connection and location details.

The origins are a comma-delimited list of allowed origins for Cross-Origin Resource Sharing (CORS) requests. Use /'*'/ to allow requests from all origins.