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.RawIdentifier = ...
// 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
}
}
Filters filters = TFProfileEvent.Filters(
devices: <List<String>>,
eventTypes: [.operation, .profileRecover, .profileAssociation, .profileDissociation, .profileDissociationFromAnotherDevice, .profileReset, .profileShare],
risk: [.high, .low, .medium, .noRisk],
status: [.accepted, .rejected],
since: Date(byAdding: .day, value: -2, to: Date()),
until: Date()
)
trustfactorClient.fetchEventsHistory(profileId: <String>, offset: 0, limit: 25, filters: <Filters>, new Result<TFEventResult, Error>() {
@Override
public void onSuccess(TFEventResult result) {
// result type: TFEventResult
}
@Override
public void onFailure(Error error) {
// handle errors
}
});