User
1. RegisterÂ
POST api/v1/register/ #register organization and user(admin)
Body Parameter | Type | Note |
---|---|---|
username | string | |
role | string | |
password | string | |
orgName | string | |
string |
Example Request Body:
{ "username": "test", "role": "administrator", "password": "foo", "passwordAgain": "foo", "orgName": "org1.cello.com", "email": "foo@email.com" }
Example Response Body:
{ "data": { "id": "0b245629-06cf-4fa5-92d9-7109a3a64b56" }, "msg": null, "status": "successful" }
2. Login
POST api/v1/login/
Body Parameter | Type | Note |
---|---|---|
username | string | |
password | string |
Example Request Body:
{ "email": "foo@email.com", "password": "foo" }
Example Respone Body:
{ "data": { "token": "<jwt-token>", "user": { "id": "5ffc8049-b1a6-4465-bd0e-ee1d33bbfbb7", "username": "foo@email.com", "role": "admin", "email": "foo@email.com", "organization": { "id": "0b245629-06cf-4fa5-92d9-7109a3a64b56", "name": "org1.cello.com" } } }, "msg": null, "status": "successful" }