Login
POST
/auth/login
const url = 'https://sylve.lan:8181/api/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"authType":"sylve","password":"example","remember":true,"username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/auth/login \ --header 'Content-Type: application/json' \ --data '{ "authType": "sylve", "password": "example", "remember": true, "username": "example" }'Authenticate an administrator and create a local session
Request Body
Section titled “Request Body”Login request body
Media typeapplication/json
object
authType
required
string
password
required
string
remember
boolean
username
required
string
Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
basicSettings
object
id
integer
initialized
boolean
pools
Array<string>
restarted
boolean
services
Array<string>
hostname
string
nodeId
string
token
string
error
string
message
string
status
string
Example
{ "data": { "basicSettings": { "services": [ "dhcp-server" ] } }}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Too Many Requests
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}