Login API

Log into Aesel with a valid username and password.

This will return values in the ‘Set-Cookie’ header, meant for use by browsers, as well as the ‘Authorization’ header, meant for use by external applications.

Login

POST /v1/login

Login to Aesel, retrieving the authentication token required for future requests.

Request Headers:
 
Status Codes:

http

POST /login HTTP/1.1
Host: localhost:8080
Content-Type: application/json

{
    "username": "aesel",
  "password": "guest"
}

curl

curl -i -X POST http://localhost:8080/login -H 'Content-Type: application/json' --data-raw '{"password": "guest", "username": "aesel"}'

wget

wget -S -O- http://localhost:8080/login --header='Content-Type: application/json' --post-data='{"password": "guest", "username": "aesel"}'

httpie

echo '{
  "password": "guest",
  "username": "aesel"
}' | http POST http://localhost:8080/login Content-Type:application/json

python-requests

requests.post('http://localhost:8080/login', headers={'Content-Type': 'application/json'}, json={'password': 'guest', 'username': 'aesel'})