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
.
Request
- 200
- 204
- 401
- 404
loginHistorySchema
- application/json
- text/csv
- Schema
- Example (from schema)
Schema
events object[]required
A list of login events
Array [id integer requiredPossible values:
>= 1
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.
username stringThe username of the user that attempted to log in. Will return "Incorrectly configured provider" when attempting to log in using a misconfigured provider.
auth_type stringThe authentication type used to log in.
created_at date-timeThe date and time of when the login was attempted.
successful booleanWhether the login was successful or not.
ip string nullableThe IP address of the client that attempted to log in.
failure_reason string nullableThe reason for the login failure. This property is only present if the login was unsuccessful.
]
{
"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
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"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
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NotFoundError",
"message": "Could not find the addon with ID \"12345\"."
}