User Activity
Get user activities, limited to 10 response by default.
Params
name | Parameter type | Data Type | Example | Required |
---|---|---|---|---|
userIds | body | integer | [1,3] | optional |
DateFrom | body | DateTime | "2021-05-05T19:54:08.704Z" | optional |
DateTo | body | DateTime | "2021-05-06T19:54:08.704Z" | optional |
activity | body | integer | 1 | optional |
source | body | integer | 1 | optional |
exportDataType | body | integer | 0 | optional |
pageNumber | query | integer | 1 | optional |
pageSize | query | integer | 10 (default) | optional |
Notes All parameters are optional, there are some default values applied when a parameter is not provided.
- UserId is an array of integers, if not provided, all users will be returned.
- 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.
- 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.
- activity is the activity type, if not provided, all activity types will be returned.
- source is the source type, if not provided, all source types will be returned.
- exportDataType enables filtering of export data (only if
activity: 8
is specified). If not provided, all types will be returned. - 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.
- 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
ID | Name |
---|---|
1 | Login Successful |
2 | Login Failed |
3 | Logout |
4 | Session Expired |
5 | LoginFailedLockedOut |
6 | LoginFailedRequiresVerification |
7 | LoginFailedForbidden |
8 | Export Data |
9 | UserSwitch |
10 | BackupAccess |
Source Types
ID | Name |
---|---|
1 | Web UI |
2 | Mobile |
3 | API |
4 | Add-In |
Export Data Type
ID | Name |
---|---|
0 | Export Data |
1 | Export Formula |
2 | Export Image |
3 | Download Document |
4 | Template 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."
}