Authentication

Login

POST /login/username

Login using username and password.

Example request:

POST /login/username HTTP/1.1
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "username": "devxoul",
  "photo": null,
  "created_at": "2017-02-21T16:59:35+0000",
  "id": 1
}
Form Parameters:
 
  • username – Username of the user
  • password – Password of the user
Status Codes:

Join

POST /join/username

Create a new user with username and password.

Example request:

POST /join/username HTTP/1.1
Accept: application/json

Example response:

HTTP/1.1 201 OK
Content-Type: application/json

{
  "username": "devxoul",
  "photo": null,
  "created_at": "2017-02-21T16:59:35+0000",
  "id": 1
}
Form Parameters:
 
  • username – Username of the user
  • password – Password of the user
Status Codes:

Logout

GET /logout

Logout from the current session.

Example request:

GET /logout HTTP/1.1
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{}