15 User Activity API
GET User Activity
Gets the activity details of a user in the Communication Cloud Service during a given time period.
Request
The GET method should be used to request data about the users who were active in the system within a given time frame.
Note:
The POST, PUT and DELETE methods are not supported for this API.The API endpoint is as follows:
https://environmentname/tenancy/api/Audit/v1/UserActivityAudit
Replace the environmentname with your specific URL information specific to your Service endpoint.
Replace tenancy with the target tenancy (non-prod, pre-prod or prod) within the environment.
Example: https://futurabank/non-prod/api/Audit/v1/UserActivityAudit
For additional information on the environment and three tenancies provided by the Service, see Financial Services Cloud Documentation.
Headers
There are several headers that may be required by the methodology utilized to call the GET method on the API. The intention here is to identify those that have special consideration or maybe considered optional for other API calls.
The standard Content-Type header should be set to application/json.
The standard Authorization header must be set to Bearer token where Token is the authentication token provided by a call to the OAuth access API.
For more information, see Authorization for API.
GET Request
The Get request can be used with the following inline parameters to return User Activity data. Due to the volume of User Activity data that may accrue in Communication Cloud, it is recommended to use a short Date / Time range to receive a quick response.
Parameters
-
From Date / Time Required. This is the start of the time period from which you want the API to return User Activity data.
-
To Date / Time Optional. This is the end of the time period from which you want the API to return User Activity data. If this field is empty, the API will return User Activity data up to and including the current date.
-
Include User Activity? (Y/N) Required. If this field has a value of ‘Y’, then the response provides details of which users accessed the system, and what they did in the system; if this field has a value of ‘N’, then the response provides only details of which users accessed the system, and does not provide details of what they did in the system.
-
LoginName Optional. This field enables you to return a single user’s activity data only, by specifying their LoginName.
-
UserPartyFamilyName Optional. This field enables you to return user activity data that relates to the users with a single family name, by specifying their last name.
-
UserPartyGivenName Optional. This field enables you to return user activity data that relates to the users with a single given name, by specifying their first name.
Note:
If you enter values for any two or all three of the fields LoginName, UserPartyFamilyName and UserPartyGivenName, the values that you supply must all relate to the same user. If you supply values that relate to different users, then the response will be empty, since LoginName, UserPartyFamilyName, and UserPartyGivenName joined by ‘And’ statements in the User Activity API’s logic.Response
The response will return an appropriate status code (201, 404, and so on.) but will also include a body that contains data about user activity.
4xx Error Response
Error responses will differ depending on the nature of the error. Generally, errors can be associated with one of several categories:
- Authorization
- Invalid Post
- Invalid Data
- Invalid Configuration
- System
2xx Success Response
{
"HasMore": true,
"Layers": 0,
"TotalResults": 1623,
"Links": [
{
"rel": "self",
"href": "audit-api/Audit/v1/AuditRec?totalResults=true&limit=2&offset=0"
},
{
"rel": "next",
"href": "audit-api/Audit/v1/AuditRec?totalResults=true&limit=5&offset=5"
}
],
"Items": [
{
"ServiceEndPoint": "TransactionConfigRec",
"ServiceRequestOperation": "CREATE",
"LoginName": "OracleFSCloudNFR",
"UserPartyGivenName": "Oracle",
"UserPartyFamilyName": "Employee",
"ServiceName": "transaction-api"
},
{
"ServiceEndPoint": "UserGroupRec",
"ServiceRequestOperation": "READ",
"LoginName": "OracleFSCloudAdmin",
"UserPartyGivenName": "Bharani",
"UserPartyFamilyName": "Siva",
"ServiceName": "entitlements-api"
}
]
}Elements
-
LoginName- The login name of a user who was active in Communication Cloud during the time period specified in the request. -
UserPartyFamilyName- The last name of a user who was active in Communication Cloud during the time period specified in the request. -
UserPartyGivenName- The first name of a user who was active in Communication Cloud during the time period specified in the request. -
ServiceEndPoint- Only returned if Include User Activity was set to ‘Y’ in the request. This is the system entity that the user interacted with. Example:CommunicationPackageConfigRec. -
ServiceRequestOperation- Only returned if Include User Activity was set to ‘Y’ in the request. This indicates whether the user Created, Read, Updated or Deleted theServiceEndPoint. -
ServiceName- Only returned if Include User Activity was set to ‘Y’ in the request. This is the name of the internal Communication Cloud API that was in operation. Example:transaction-api. This can be useful in providing context about the task that the user was doing in the system.