User Activity

User Activity

The User Activity endpoint allows retrieval of data from the User Activity Audit Log report on DealCloud. This report provides visibility of certain events or "activity types" at the user level. The Activity Types table details the events currently tracked.

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

Param Descriptions & Default Values

All parameters are optional. There are some default values applied when a parameter is not provided.

  1. userIDs is an array of integers. If not specified, activity logs for all users will be returned.
  2. dateFrom is the start date of the search. If not provided, the default value is 90 days ago, which is also the maximum allowed range.
  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 of the user activity. 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.
  8. pageSize is the number of records returned per page. If not provided, the default value is 10.

Activity Types

IDNameDescription
1Login SuccessfulUser has logged in sucessfully
2Login FailedUser login has failed
3LogoutUser has logged out successfully
4Session ExpiredUser session has expired
5Login Failed (Locked Out)User login failed, account locked due to too many incorrect attempts
6Login Requires Verification2FA enabled, login requires verification
7Login Failed (Forbidden)User login failed due to incorrect login credentials
8Export DataUser exported a data file (see below)
9User Proxy / SwitchUser proxied as another user
10BackupAccessUser accessed Site Backups
11IP Restriction AppliedUser access fordbidden due to IP restriction

Source Types

IDNameDescription
1Web UIActivity source is the web app (UI)
2MobileActivity source is the mobile app
3OutlookActivity source is the Outlook extension
4ExcelActivity source is the Excel add-in
5WordActivity source is the Word add-in
6UnknownActivity source is unknown or not being tracked by system
7Chrome ExtensionActivity source is the Chrome extension
8Web Add-InActivity source is Web Add-In
9Mobile NextActivity source is Intapp Mobile 2.0
10PowerPointActivity source is the PowerPoint add-in
11TeamsActivity source is the Teams add-in

Export Data Type

Export Data types are defined below in the table. This parameter exportDataType allows further filtering when Activity Type is set to Export Data (activity: 8)

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."
}