BVMS Server- and Client-SDK
BVMS Server- and Client-SDK
BVMS Server- and Client-SDK
Bosch.Vms.SDK
IAuditTrailManager Interface
IAuditTrailManager Methods
ExportAuditTrailEntriesToCsvFile Method

# IAuditTrailManagerExportAuditTrailEntriesToCsvFile Method |

Exports all configuration change Audit Trail within selected time frame to a CSV file (or several CSV files if necessary).

Note: The current implementation of this method should only be used in sever scripts.

Namespace: Bosch.Vms.SDK
Assembly: Bosch.Vms.SDK (in Bosch.Vms.SDK.dll) Version: 1.9.0.0
Syntax
C#
Copy

    void ExportAuditTrailEntriesToCsvFile(
    	string fileName,
    	DateTime? startTimeUtc,
    	DateTime? endTimeUtc
    )

#### Parameters

fileName String
  File name of the CSV file (including extension and directory path where CSV file containing the resulting logbook entries will be saved).
startTimeUtc Nullable DateTime
  Start of the time interval of Audit Trail entries to be exported. UTC time required. If value is not , entries with timestamp greater or equal will be exported, otherwise - all entries without start limit.
endTimeUtc Nullable DateTime
  End of the time interval of Audit Trail entries to be exported. UTC time required. If value is not , entries with timestamp less or equal will be exported, otherwise - all entries without end limit.

Exceptions

Exception | Condition
--- | ---
SdkException | Thrown in case of any errors occurred during export process. For example: - Export target directory is not whitelisted. - Method executed in client script or in a external SDK application.
AuditTrailExportSdkException | Thrown in case of export failure. Contains property of enum type AuditTrailFaultCode; the value of this property indicates the reason for the failure.

Remarks

This method will write all Audit Trail entries to the CSV file starting from startTimeUtc until endTimeUtc if value provided.

If more than one million logbook entries match the specified search criteria then the method creates several CSV files, each containing at most one million entries. (The reason for this is that Microsoft Excel(TM) 2007 and 2010 cannot import CSV files with more than 1.048.576 rows.) The names of the additional CSV files are constructed by appending an ordinal number to the specified file name.

Tip
The method uses "accept known good" input validation strategy and ensures that requested fileName is strictly within a configured whitelist where exports are allowed. Requested export path must meet one of the following condition: - Specified path directory is white-listed itself; - Specified path directory is subdirectory of any white-listed directory; - Specified path is within an optical disc device, such as a CD or DVD-ROM or within removable storage device, such as a floppy disk drive or a USB drive; When none of the conditions above are met, requested export is rejected.

Tip
Exports whitelist is defined by BVMS administrator on Central Server in ..\ProgramData\Bosch\VMS\ServerData\PathWhitelistForExports.txt.

See Also

#### Reference

IAuditTrailManager Interface
Bosch.Vms.SDK Namespace

Copyright © Bosch Sicherheitssysteme GmbH