MacOS with docker v18.06, docker-compose v1.22
./scripts/run-test.sh
./scripts/run-test.sh
POST /auth
Login
Body format e.g.`{email: '[email protected]', password: 'abc'}POST /resources
Create resource
Body format e.g.{name: 'abc'}
GET /resources
List resource
Query params supportuser_id
for admin user to list resources for specific userDELETE /resources/:id
Delete a resourcePOST /users
Create user (admin only)
Body format e.g.{email: '[email protected]', password: 'abc', role: 'normal', quota: 123}
GET /users
List users (admin only)DELETE /users/:id
Delete user (admin only)PUT /users/:id/quota
Update quota (admin only)
Body format e.g.{quota: 123}
After login successfully, you will get a token. Put the token in the Authorization
header in the following format.
For eg. token = 123456
Authorization: Bearer 123455
Default expiry time is 2 hours later.
Accespt: application/json
Content-Type: application/json
for POST and PUT requests
- Database is not persistent. It can be made persistent by add volume mapping to db services.
- Default users are just one admin user
[email protected]/abc