Last active
September 23, 2015 20:16
-
-
Save dmcassel/24dea1705b5a5e41272c to your computer and use it in GitHub Desktop.
REST API Setup steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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