v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Audit Records

Get Audit Records for 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.
get/api/access/v1/login-history

Query parameters

userIdstring uuid

The unique identifier of a specific user to filter login history.

startDatestring date-time

The start date for the login history search. Format: YYYY-MM-DDTHH:MM:SSZ

endDatestring date-time

The end date for the login history search. Format: YYYY-MM-DDTHH:MM:SSZ

pageinteger

The page number to retrieve.

sizeinteger

The number of records per page.

Response

OK

emptyboolean

Indicates whether the result set is empty.

firstboolean

Indicates whether this is the first page.

lastboolean

Indicates whether this is the last page.

numberinteger

The current page number.

numberOfElementsinteger

The number of records in the current page.

sizeinteger

The total number of records across all pages.

totalElementsinteger

The total number of pages available.

totalPagesinteger

The pagination details for this response.

pageableobject

The pagination details for this response.

Example response

{
  "content": [
    {
      "userName": "johndoe@onetrust.com",
      "ipAddress": "127.0.0.1.",
      "userAgentString": "Chrome 90.0.4430.212 | Windows 10",
      "createDT": "2023-01-15T14:30:00Z",
      "status": "Success",
      "userId": "123e4567-e89b-12d3-a456-426614174001"
    }
  ],
  "numberOfElements": 1,
  "size": 20,
  "totalElements": 1,
  "totalPages": 1,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 20,
    "paged": true,
    "sort": [
      {
        "ascending": true,
        "descending": false,
        "direction": "ASC",
        "ignoreCase": false,
        "nullHandling": "NATIVE",
        "property": "name"
      }
    ],
    "unpaged": false
  }
}
All 598 operations