User
User get own details
GET /api/user
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user
Initial data for web app
GET /api/user/init
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user/init
Update own details
PUT /api/user
Payload
propertytype | descriptionexample | emailstring | Emailexample@example.com |
name_givenstring | John |
name_familystring | Doe |
organisationstring | Zentri |
Curl Example
curl -v -X PUT -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"email":"example@example.com","name_given":"John","name_family":"Doe","organisation":"Zentri"}' http://localhost:2002/api/user
User status for dashboard
GET /api/user/status
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user/status
Add a Token
POST /api/user/tokens
Curl Example
curl -v -X POST -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user/tokens
Revoke Token
DELETE /api/user/tokens/{token_id}
Parameters
propertytype | descriptionexample | token_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Curl Example
curl -v -X DELETE -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user/tokens/{token_id}
User get tokens
GET /api/user/tokens
Curl Example
curl -v -X GET -H 'Authorization: Bearer <user-token>' http://localhost:2002/api/user/tokens
Update token title
PUT /api/user/tokens/{token_id}
Parameters
propertytype | descriptionexample | token_idid | id1a9e45b4-2c30-4cbd-8812-fcc82c1f3ea1 |
Payload
propertytype | descriptionexample | titlestring required | Token titleMy Token |
Curl Example
curl -v -X PUT -H 'Authorization: Bearer <user-token>' -H "Content-type: application/json" -d '{"title":"My Token"}' http://localhost:2002/api/user/tokens/{token_id}