Skip to content

Log in

POST
/api/v1/auth/login
curl --request POST \
--url http://localhost:8080/api/v1/auth/login \
--header 'Content-Type: application/json' \
--header 'X-Brokerium-Request: 1' \
--data '{ "username": "example", "password": "example" }'
X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
username
required
string
password
required
string format: password

Example generated

{
"username": "example",
"password": "example"
}

Session created; the cookie is set as well.

Media typeapplication/json
object
user
required
object
id
required
string
username
required
string
role
required
string
Allowed values: admin operator viewer
disabled
required
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
token
required
string
expiresAt
required
string format: date-time

Example

{
"user": {
"role": "admin"
}
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Too many failed logins for this user from this address (too_many_attempts).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}
Retry-After
integer

Seconds until the next attempt is accepted.

Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.