---
title: "Get all login events."
method: GET
path: "/api/admin/logins"
tags: ["Instance Admin"]
---

# Get all login events.

`GET /api/admin/logins`

**Enterprise feature**

Returns **all** login events in the Unleash system. You can optionally get them in CSV format by specifying the `Accept` header as `text/csv`.

## Response `200`

loginHistorySchema

- LoginHistorySchema — A response model with a list of login events.
  - `events` LoginEventSchema[], required — A list of login events
    - `id` integer, required — 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` string — The 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` string — The authentication type used to log in.
    - `type` 'login' | 'logout' — The type of event. `login` for sign-in attempts and `logout` for sign-outs.
    - `created_at` string, date-time — The date and time of when the login was attempted.
    - `successful` boolean — Whether the login was successful or not.
    - `ip` string, nullable — The IP address of the client that attempted to log in.
    - `failure_reason` string, nullable — The reason for the login failure. This property is only present if the login was unsuccessful.

## Other responses

- `204` — This response has no body.
- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `404` — The requested resource was not found.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
