-
Notifications
You must be signed in to change notification settings - Fork 9
cURL requests examples
Piotr Gankiewicz edited this page Dec 4, 2016
·
1 revision
curl http://localhost:5000/init -H "Content-Type: application/json" -X POST -d '{"username": "root", "password": "secret"}'
Replace API_KEY.
curl http://localhost:5000/users -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -X POST -d '{"username": "user1", "password": "secret"}'
Replace API_KEY.
curl http://localhost:5000/boxes/default -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -d '{}' -X POST
Replace API_KEY.
curl http://localhost:5000/boxes/default/users -H "Authorization: API_KEY" -H "Content-Type: application/json" -X POST -d '{"username": "user1", "role": "boxuser"}'
Replace API_KEY.
curl http://localhost:5000/boxes/default/users/user1/permissions -H "Authorization: API_KEY" -H "Content-Type: application/json" -X PUT -d '["readentrykeys", "readentry", "createentry", "deleteentry"]'
Replace API_KEY and ENCRYPTION_KEY.
curl http://localhost:5000/boxes/api/entries -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -H "X-Encryption-Key: ENCRYPTION_KEY" -X POST -d '{ "key": "appsettings", "value": { "database": { "connectionString": "secret-connection-string", "port": 1234 }, "email": { "apikey": "secret-api-key", "apiUrl": "api.email-provider.com" }}}'
Replace API_KEY and ENCRYPTION_KEY.
curl http://localhost:5000/boxes/default/entries/appsettings -H "Authorization: API_KEY" -H "X-Encryption-Key: ENCRYPTION_KEY"
Replace API_KEY.
curl http://localhost:5000/boxes/default -H "Authorization: API_KEY"