User

1. Register 

POST api/v1/register/ #register organization and user(admin)

Body ParameterTypeNote
usernamestring
rolestring
passwordstring
passwrodAgainstring
orgNamestring
emailstring

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 ParameterTypeNote
usernamestring
passwordstring

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"
}