Skip to main content

Pivot user entrances API

You can use the Pivot user entrances API to view user entrance actions within a specified start and end date.

Pivot must be running in native users mode.

Get user entrances

Returns a list of user entrance actions within a specified start and end date.

URL

GET /api/v1/user-entrances?startDate=yyyy-mm-dd&endDate=yyyy-mm-dd

Sample request

The following example request returns user entrance actions between December 31, 2023 and January 31, 2024.

curl -X GET 'http://PIVOT_URL/api/v1/user-entrances?startDate=2023-12-31&endDate=2024-01-31' \
--header 'x-imply-api-token: <token>' \
--header 'Content-Type: application/json'

Success response

CodeDescription
200"status": "ok"

Sample error response

CodeExample body
500 Internal Server Error"Error: Must provide startDate search parameter"

Sample response

{
"entrances": [
{
"user": "admin-user@example.com",
"time": 1704799008123,
"type": "welcome",
"ip": "::ffff:127.0.0.1"
},
{
"user": "admin-user@example.com",
"time": 1701862872875,
"type": "login",
"ip": "::ffff:127.0.0.1"
},
{
"user": "analyst-user@example.com",
"time": 1701862872875,
"type": "pass-reset",
"ip": "::ffff:127.0.0.1"
}
]
}

The API returns the timestamp in ISO 8601 format.

The type values are as follows:

  • login: User logs in.
  • invite: User logs in for the first time via a login invitation.
  • pass-reset: User resets their password.
  • welcome: User logs in for the first time via the welcome screen.