Get Events History
Client requirements
caution
When fetching events history, events of the type "operation" do not contain all the details.
- iOS (Swift)
- Android (Java)
let profileId: TFApplicationProfile.ID = ...
// can be ommited
let filters: TFProfileEventHistoryFilter? = nil
let offset: Int64 = 0
let limit: Int64 = 20
trustfactorClient.fetchEventsHistory(for: profileId, offset: offset, limit: limit, filters: filters) { result, correlationID in
switch result {
case .failure(let error):
// handle error
case .success(let eventResult):
// handle results
}
}
TFApplicationProfileEventHistoryFilter filters = new TFApplicationProfileEventHistoryFilter(
deviceKeyList,
Arrays.asList(TFApplicationProfileEvent.EventType.OPERATION, TFApplicationProfileEvent.EventType.PROFILE_RECOVER, TFApplicationProfileEvent.EventType.PROFILE_ASSOCIATION, TFApplicationProfileEvent.EventType.PROFILE_DISSOCIATION, TFApplicationProfileEvent.EventType.PROFILE_DISSOCIATION_FROM_ANOTHER_DEVICE, TFApplicationProfileEvent.EventType.PROFILE_RESET, TFApplicationProfileEvent.EventType.PROFILE_SHARE),
Arrays.asList(Risk.HIGH, Risk.LOW, Risk.MEDIUM, Risk.NONE),
Arrays.asList(Status.ACCEPTED, Status.REJECTED),
startDate,
endDate
);
trustfactorClient.fetchEventsHistory(profileId, 0, 25, filters, (result) -> result.fold(
(TFProfileEventsFeed eventFeed, String correlationId) -> {
// handle success
},
(Error error, String correlationId) -> {
// handle errors
}
));