User Activity

User Activity

Get user activities, limited to 10 response by default.

Params

nameParameter typeData TypeExampleRequired
userIdsbodyinteger[1,3]optional
DateFrombodyDateTime"2021-05-05T19:54:08.704Z"optional
DateTobodyDateTime"2021-05-06T19:54:08.704Z"optional
activitybodyinteger1optional
sourcebodyinteger1optional
exportDataTypebodyinteger0optional
pageNumberqueryinteger1optional
pageSizequeryinteger10 (default)optional

Notes All parameters are optional, there are some default values applied when a parameter is not provided.

  1. UserId is an array of integers, if not provided, all users will be returned.
  2. DateFrom is the start date of the search, if not provided, the default value is 90 days ago.90 days ago is also the maximum date range allowed.
  3. DateTo is the end date of the search, if not provided, the default value is today. This value must be at least 1 day greater than DateFrom. Date Filters are evaluated to the nearest date.
  4. activity is the activity type, if not provided, all activity types will be returned.
  5. source is the source type, if not provided, all source types will be returned.
  6. exportDataType enables filtering of export data (only if activity: 8 is specified). If not provided, all types will be returned.
  7. pageNumber is the page number of the response, if not provided, the default value is 1. This can be used to increase the number of records returned.
  8. pageSize is the number of records returned per page, if not provided, the default value is 10. This can be used to increase the number of records returned.

Activity Types

IDName
1Login Successful
2Login Failed
3Logout
4Session Expired
5LoginFailedLockedOut
6LoginFailedRequiresVerification
7LoginFailedForbidden
8Export Data
9UserSwitch
10BackupAccess

Source Types

IDName
1Web UI
2Mobile
3API
4Add-In

Export Data Type

IDName
0Export Data
1Export Formula
2Export Image
3Download Document
4Template Report

Sample Query

All params are optional

{
  "userIds": [
    0
  ],
  "dateFrom": "2021-05-05T19:54:08.704Z",
  "dateTo": "2021-05-05T19:54:08.704Z",
  "activity": 1,
  "source": 1,
}

Sample Requests

POST {{host}}/api/rest/v1/management/user/activity
Authorization: {{auth}}
Content-Type: application/json
 
{
  "userIds": [
    1
  ],
  "dateFrom": "2022-01-05T19:54:08.704Z",
  "dateTo": "2022-05-05T19:54:08.704Z",
  "activity": 8,
  "exportDataType": 0,
  "source": 1
}

Sample Responses

HTTP/1.1 200 OK
...
{
  "totalRecords": 8382,
  "rows": [
    {
      "userName": "admin@dealcloud.com",
      "fullName": "Jamie Jones",
      "eventDate": "2022-01-06T06:27:55.6",
      "activityTypeId": 1,
      "activityType": "Login Successful",
      "sourceTypeId": 1,
      "sourceType": "Web",
      "ipAddress": 184545776,
      "userId": 1,
      "sessionId": "f32b5dd1-9be8-47d7-bb2c-19942a3fa22d"
    },
    {
      "userName": "admin@dealcloud.com",
      "fullName": "Jamie Jones",
      "eventDate": "2022-01-06T07:05:52.003",
      "activityTypeId": 4,
      "activityType": "SessionExpired",
      "sourceTypeId": 1,
      "sourceType": "Web",
      "userId": 1,
      "sessionId": "ac10dfa2-d8bf-4942-9c47-ea683f167fde"
    },
    {
      "userName": "admin@dealcloud.com",
      "fullName": "Jamie Jones",
      "eventDate": "2022-01-06T07:16:28.403",
      "activityTypeId": 1,
      "activityType": "Login Successful",
      "sourceTypeId": 1,
      "sourceType": "Web",
      "ipAddress": 184545776,
      "userId": 1,
      "sessionId": "bd20aec6-d477-4f6a-9bcc-83ba231947be"
    }
  ]
HTTP/1.1 400 Bad Request
 
{
  "message": "DateTo should be greater than DateFrom."
}