Skip to content

Instantly share code, notes, and snippets.

@dmcassel
Last active September 23, 2015 20:16
Show Gist options
  • Save dmcassel/24dea1705b5a5e41272c to your computer and use it in GitHub Desktop.
Save dmcassel/24dea1705b5a5e41272c to your computer and use it in GitHub Desktop.
REST API Setup steps
curl -v -X PUT --anyauth -u admin:admin \
--header "Content-Type:application/json" \
-d '{"collection-lexicon":true}' \
http://localhost:8002/manage/v2/databases/TutorialDB/properties
curl -v -X POST --anyauth -u admin:admin \
--header "Content-Type:application/json" \
-d '{"user-name":"rest-admin", "password": "x", "role": ["rest-admin"]}' \
http://localhost:8002/manage/v2/users
curl -v -X POST --anyauth -u admin:admin \
--header "Content-Type:application/json" \
-d '{"user-name":"rest-writer", "password": "x", "role": ["rest-writer"]}' \
http://localhost:8002/manage/v2/users
curl -v -X POST --anyauth -u admin:admin \
--header "Content-Type:application/json" \
-d '{"rest-api": { "name": "TutorialServer", "port": "8011", "database": "TutorialDB", "modules-database": "Tutorial-Modules" } }' \
http://localhost:8002/v1/rest-apis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment