To download the full code sample see our Code Share site.
This topic describes how to retrieve an extensive delegation audit trail for an account in OneSpan Sign. This audit trail will provide you with complete history of any changes occurring in your account regarding delegation.
For more information, see Delegating Access.
To retrieve this audit trail you will need to provide a date range for the information you like to see. The following code will do this:
Date START_DATE = new LocalDateTime(2016, 1, 1, 0, 0).toDate(); Date END_DATE = LocalDateTime.now().toDate();
Once you have done that, you can retrieve your delegation report using the OneSpan Sign client:
DelegationReport report = eslClient.getReportService().downloadDelegationReport(START_DATE, END_DATE);
The following code will allow you to navigate through each event:
Map<String, List<DelegationEventReport>> eventReport = report.getDelegationEventReports(); for (Entry<String, List<DelegationEventReport>> entry : eventReport.entrySet()) { for (DelegationEventReport r : entry.getValue()) { System.out.format("Event User: %s\nEvent Date: %s\nEvent Type: %s\nEvent Description: %s\n\n", r.getEventUser(), r.getEventDate().toString(), r.getEventType(), r.getEventDescription()); } }
You can also download this report in CSV format, by using the following code:
String reportCSV = eslClient.getReportService().downloadDelegationReportAsCSV(START_DATE, END_DATE);
Results
Here is an example of what you can expect to see once you have run your code.
To download the full code sample see our Code Share site.
This topic describes how to retrieve an extensive delegation audit trail for an account in OneSpan Sign. This audit trail will provide you with complete history of any changes occurring in your account regarding delegation.
For more information, see Delegating Access.
To retrieve this audit trail you will need to provide a date range for the information you like to see. The following code will do this:
DateTime from = new DateTime(2016, 1, 1); DateTime to = DateTime.Now;
Once you have done that, you can retrieve your delegation report using the OneSpan Sign client:
DelegationReport report = eslClient.ReportService.DownloadDelegationReport(from, to);
The following code will allow you to navigate through each event:
IDictionary<string, IList<DelegationEventReport>> eventReport = report.DelegationEvents; foreach (var entry in eventReport) { foreach (DelegationEventReport r in entry.Value) { Debug.WriteLine("Event User: {0}\nEvent Date: {1}\nEvent Type: {2}\nEvent Description: {3}\n", r.EventUser, r.EventDate.ToString(), r.EventType, r.EventDescription); } }
You can also download this report in CSV format, by using the following code:
string reportCSV = eslClient.ReportService.DownloadDelegationReportAsCSV(START_DATE, END_DATE);
Results
Here is an example of what you can expect to see once you have run your code.
To download the full code sample see our Code Share site.
This topic describes how to retrieve an extensive delegation audit trail for an account in OneSpan Sign. This audit trail will provide you with complete history of any changes occurring in your account regarding delegation.
For more information, see Delegating Access.
To retrieve this audit trail you will need to provide a date range for the information you like to see. The following code will do this:
string START_DATE = "2016-01-01"; string END_DATE = "2017-01-09";
Then, you can retrieve your delegation report by making the following request:
HTTP Request
GET /api/reports/delegation?from={START_DATE}&to={END_DATE}
HTTP Headers
Accept: application/json Content-Type: application/json Authorization: Basic api_key
Response Payload
{ "from": "2016-01-01T00:00:00Z", "to": "2017-01-10T00:00:00Z", "delegationEvents": { "ZQI8k6faVoM8": [ { "eventDate": "2017-01-09T18:35:04Z", "eventType": "Updated Delegates", "eventDescription": "Set delegates to: John Smith ([email protected]) to delegate on behalf of: Haris Haidary ([email protected])", "eventUser": "Haris Haidary ([email protected], from 00.00.000.000) " }, { "eventDate": "2017-01-09T19:09:46Z", "eventType": "Removed all Delegates", "eventDescription": "Removed all delegates for: Haris Haidary ([email protected])", "eventUser": "Haris Haidary ([email protected], from 00.00.000.000) " } ] } }
You can also download the usage report in CSV format by setting the Accept header to text/csv.