Get all login events.
GET/api/admin/logins
Returns all login events in the Unleash system. You can optionally get them in CSV format by specifying the Accept
header as text/csv
.
Responses
- 200
- 204
- 401
- 404
loginHistorySchema
- application/json
- text/csv
- Schema
- Example (from schema)
Schema
Array [
]
events
object[]
required
A list of login events
The event's ID. Event IDs are incrementing integers. In other words, a more recent event will always have a higher ID than an older event.
Possible values: >= 1
13
The username of the user that attempted to log in. Will return "Incorrectly configured provider" when attempting to log in using a misconfigured provider.
admin
The authentication type used to log in.
simple
The date and time of when the login was attempted.
2023-03-01T12:04:26.061Z
Whether the login was successful or not.
true
The IP address of the client that attempted to log in.
::ffff:127.0.0.1
The reason for the login failure. This property is only present if the login was unsuccessful.
No user found
{
"events": [
{
"id": 13,
"username": "admin",
"auth_type": "simple",
"created_at": "2023-03-01T12:04:26.061Z",
"successful": true,
"ip": "::ffff:127.0.0.1",
"failure_reason": "No user found"
}
]
}
- Schema
Schema
string
This response has no body.
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
AuthenticationRequired
A description of what went wrong.
You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
The requested resource was not found.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
NotFoundError
A description of what went wrong.
Could not find the addon with ID "12345".
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NotFoundError",
"message": "Could not find the addon with ID \"12345\"."
}