Client Analytics API
Overview
Investment Cafe Portal can be configured to capture information, on how each user interacts with the data presented on the screen.
Where this feature has been enabled, the
Client Analytics API will allow you to request and download that data for a given period.
Getting Started
The following diagram provides an overview of the series of calls needed to obtain captured
Client Analytics data from Investment Cafe.
Each Call Step by Step
1. Start by calling
POST /v1/clientanalytics/data setting a
name and the
start date and
end date of the period you wish to view client activity over.
Example of API request body
{
"name": "client-analytics-report-1",
"startDateTime" : "2022-12-01T00:00:00.000Z",
"endDateTime" : "2022-12-01T23:59:59.999Z"
}
If successful, the service will return a
202 status code along with an ID (indicating that the report generation has been accepted and will commence shortly).
Example of API response
{
"id": 1,
"message": "Request started successfully."
}
2. To check the current status of the report generation request, allow 10 to 15 seconds, then call
GET /v1/clientanalytics/data/meta?id=X (where X is the
id returned in step 1). The
jobState in the response indicates the current progress. If marked as
IN_PROGRESS, then allow another 30 secs before calling this service again to confirm the generation has completed.
Example of API response
{
"id": 1,
"name": "client-analytics-report-1",
"created": "2022-12-01T17:57:29.280Z",
"lastModified": null,
"createdBy": "U0073",
"startTime": "2022-12-01T00:00:00.000Z",
"endTime": "2022-12-01T23:59:59.999Z",
"jobState": "DONE"
}
3. Once the
jobState is marked as
DONE, call
GET /v1/clientanalytics/data?id=X to download the final report.
The downloadable file will be presented using the supplied 'name' from step 1 (e.g "client-analytics-report-1").
In the event the
jobState returns as
FAILED, proceed to delete the request by calling
DELETE /v1/clientanalytics/data?id=X and repeat steps 1 to 3.
Validation Rules & Notes
- Searchable Client Analytics data is only available for up to 8 days into the past.
- Only 1 analytics report can be generated for a particular start and end date range.
- The report 'name' field is optional and will be automatically generated where not supplied.
- In all cases the report 'name' must be unique.