---
title: "Get Audit Records for Login History"
method: GET
path: "/api/access/v1/login-history"
tags: ["Audit Records"]
---

# Get Audit Records for Login History

`GET /api/access/v1/login-history`

Use this API to retrieve the login history of all users or a specific user for audit purposes.

> 🗒 Things to Know
>
> - If a date range and specific `userId` is not specified in the request, the response will include the login history for all users over the past 7 days.
> - If a date range is not specified but a specific `userId` is specified in the request, the response will include the login history for that specific user over the past 365 days.
> - If a date range is specified but a specific `userId` is not specified in the request, the response will include the login history for all users over the specified date range.
> - If the date range does not fall within the last 365 days, the response will return an error.

## Query parameters

- `userId` string, uuid
- `startDate` string, date-time
- `endDate` string, date-time
- `page` integer
- `size` integer

## Response `200`

OK

- PlatformAccessManagementPageLoginHistoryResponse
  - `content` PlatformAccessManagementLoginHistoryResponse[] — The list of login history records in the current page.
    - `userName` string — The username or email address used to log in.
    - `ipAddress` string — The IP address from which the login attempt was made. Supports both IPv4 and IPv6 addresses.
    - `userAgentString` string — The browser and operating system information from the login attempt.
    - `createDT` string, date-time — The date and time of the login attempt.
    - `status` 'Success' | 'Failure' — The result of the login attempt (Success or Failure).
    - `userId` string, uuid — The unique identifier of the user.
  - `empty` boolean — Indicates whether the result set is empty.
  - `first` boolean — Indicates whether this is the first page.
  - `last` boolean — Indicates whether this is the last page.
  - `number` integer — The current page number.
  - `numberOfElements` integer — The number of records in the current page.
  - `size` integer — The total number of records across all pages.
  - `totalElements` integer — The total number of pages available.
  - `totalPages` integer — The pagination details for this response.
  - `sort` PlatformAccessManagementSortObject
    - `empty` boolean — Indicates whether the result set is empty, meaning no records were found.
    - `sorted` boolean — Indicates whether the results are sorted in a specific order, such as ascending or descending.
    - `unsorted` boolean — The indicator of whether the results are unsorted.
  - `pageable` object — The pagination details for this response.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/revisions/21de3aa0b170/schema)
