-
Notifications
You must be signed in to change notification settings - Fork 0
Home
David edited this page Nov 10, 2016
·
1 revision
8080
Clients must know the secret HMAC key to access the server API. To verify with the service, clients must pass in the header:
- Authorization-Key: a key that is unique to each request
- Authorization: token that is encoded from the key using the secret HMAC key. It must be prepended with 'HMAC '
| Method | URL | Body/Params | Description |
|---|---|---|---|
| GET | /setup | N/A | set up users table |
| GET | /users | N/A | return all users in the users table |
| GET | /users/:id | user id | returns 1 user |
| POST | /users | firstname, lastname, gender, email, password | creates an user in the users table |
| PUT | /users/:id | firstName, lastName, isAdmin, isActive, gender, email, password, level, preference | changes a user param in the users table |
| DELETE | /users/:id | N/A | deletes 1 user in the users table |
| POST | /users/auth | email, password | authenticates a user by email and password, returns a session token |