Skip to content
On this page

Adminserver: Auth API

EndpointMethodDescription
/auth/logoutwebRequestLogout
/auth/checkwebRequestAuth check
/auth/getOneTimeAuthTokenwebRequestGet one time auth token
/auth/loginwebRequestLogin

Logout

HTTP Method: POST

Path: /auth/logout

Request:

{ empty }

Response:

{ empty }

Auth check

HTTP Method: POST

Path: /auth/check

Request:

{ empty }

Response:

{ empty }

Get one time auth token

HTTP Method: POST

Path: /auth/getOneTimeAuthToken

Request:

map[string]{ custom structure }

Response:

{
    "token": string
}

Login

HTTP Method: POST

Path: /auth/login

Description:

Api sets session to cookies and also returns session id in response.

Session id could be set to header X-Session-Id: {sessionId} to authorize following api requests.

Request:

{
    "email": string
    "password": string
}

Response:

{
    "sessionId": string
    "userId": string
    "preferredNetworkId": string  // network with the most powerful user role
    "preferredNetworkName": string
}