Skip to content

API: Authentication

To access the API, log in using your username and password. Include your credentials in the Authorization header using Basic authentication (base64-encode username:password). The login request returns a JWT token that must be sent with all subsequent API calls as a Bearer token.

Login

Send your credentials to receive a JWT token.

Request:

POST /api/v1/auth/login HTTP/1.1
Authorization: Basic {Base64(username:password)}

Response:

1
2
3
{
  "token": "eyJhbGciOiJSUzI1NiJ9..."
}

curl:

curl -k -X POST https://local-c2:8443/api/v1/auth/login \
  -H "Authorization: Basic $(echo -n 'username:password' | base64)"

Info

Store the returned token value and pass it as Authorization: Bearer {token} in all subsequent requests.