Authentication

Log in, obtain an authorization token and log out

Most API endpoints expect the authorization token in the authorization HTTP header, exactly as returned by the login endpoint (no Bearer prefix). A token is valid for 24 hours or until logout. A request without a token is rejected with 401 and the plain-text body Missing token; a request with a malformed or expired token gets 401 and Invalid token. A request whose role is below the endpoint’s minimum user role gets 401 as well (see Responses).

Endpoints that do not require a token: login, GET /api/gui_info, GET /api/state, the health checks, GET /api/storage/captures/download and the syslog download endpoints. Their pages say so.

Which authentication sources are tried, and in which order, is defined by the AAA Configuration.

API

Back to Index