Setting Database Options Using REST API

The following curl request uses the REST API to create a database. This is creating a database foo, with dba-user dba and dba-password goalie, using the Single Host template. The database options being set are the same as those in the previous examples, and they are specified next to the options tag:

# create database
 curl -u domain:bruin -X POST -H "Accept: application/json" -H "Content-type: application/json"
      -d '{ "name": "foo", "username": "dba", "password": "goalie", "template": "Single Host",
            "options": { "commit" : "remote:1", "mem" : "2g", "journal-max-directory-entries" : "1000" },
            "variables": { "HOST": "82808d4d-d85d-4c99-bfe3-e5f76ec71bb5"}}' http://localhost:8888/api/1/databases