--- title: "Retrieving an Audit Trail" slug: "retrieving-an-audit-trail" updated: 2024-10-10T13:49:35Z published: 2024-10-10T13:49:35Z canonical: "docs.onespan.com/retrieving-an-audit-trail" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Retrieving an Audit Trail [Java SDK](/v1/docs/retrieving-an-audit-trail#java-sdk) [.NET SDK](/v1/docs/retrieving-an-audit-trail#net-sdk) [REST API](/v1/docs/retrieving-an-audit-trail#rest-api) [APEX SDK](/v1/docs/retrieving-an-audit-trail#apex-sdk) ## Java SDK To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/audit-trail-example-java-sdk/) site. A document’s Audit Trail contains the digital certificate used to sign, as well as the signature block image, time stamp and unique signer identification information. The document and the e-signatures it contains are tamper-sealed with a digital signature to guarantee the integrity and authenticity of the e-signed record. Especially relevant in a multi-signer process, OneSpan Sign independently time stamps and locks down each signature and any data entered by each signer independently of the others. So when you review the audit trail even years later, it is clear who signed what, in what order, at what time, etc. To retrieve an audit trail you must first create your EslClient using your API_Key and your API_URL. The following code will do this: ```java public static final String API_KEY = "YOUR_API_KEY"; public static final String API_URL = "https://sandbox.esignlive.com/api"; EslClient eslClient = new EslClient( API_KEY, API_URL ); ``` > The API_URL that you will be using depends on your environment. For example: > > - For Sandbox environments, use > > ```http > https://sandbox.esignlive.com/api > ``` > - For Production environments, use > > ```http > https://apps.esignlive.com/api > ``` > > For more information, see [Environment URLs and IP Addresses](/v1/docs/environment-urls-ip-addresses). Next, create a new PackageId object using a static PackageId string. Normally this would be generated dynamically, but for this example a static value is used. The following code will do this: ```java PackageId packageId = new PackageId("PACKAGE_ID"); ``` Then create of list of audit information and your list iterator. ```java List auditList = eslClient.getAuditService().getAudit(packageId); Iterator iter = auditList.iterator(); ``` Finally, you can use a loop to navigate through the list of Audit information. With each loop, the different property values are printed to the console. ```java while(iter.hasNext()) {     Audit myaudit = iter.next();     System.out.println("DateTime - " + myaudit.getDateTime() + ", Type - " + myaudit.getType() + ", User - " +     myaudit.getUser() + ", Email - " + myaudit.getEmail() + ", IP - " + myaudit.getIp() + ", Target - " + myaudit.getTarget() + ", Data - " + myaudit.getData()); } ``` ### Results Here is an example of what you can expect to see once you have run your code. ![](https://cdn.document360.io/038f59a7-abd0-4c14-9de7-3434d28b49fd/Images/Documentation/java_audit_trail.png?sv=2026-02-06&spr=https&st=2026-11-04T04%3A59%3A11Z&se=2026-11-04T05%3A59%3A11Z&sr=c&sp=r&sig=FhhoG6dzziTiTk63BfrX81ViPY2%2BzDKAroDnBc6FuCA%3D) ## .NET SDK To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/audit-trail-example-net-sdk/) site. A document’s Audit Trail contains the digital certificate used to sign, as well as the signature block image, time stamp and unique signer identification information. The document and the e-signatures it contains are tamper-sealed with a digital signature to guarantee the integrity and authenticity of the e-signed record. Especially relevant in a multi-signer process, OneSpan Sign independently time stamps and locks down each signature and any data entered by each signer independently of the others. So when you review the audit trail even years later, it is clear who signed what, in what order, at what time, etc. ### Retrieving an Audit Trail To retrieve an audit trail you must first create your EslClient using your API_Key and your API_URL. The following code will do this: ```csharp String apiUrl = "https://sandbox.esignlive.com/api"; String apiKey = "YOUR_API_KEY"; EslClient eslClient = new EslClient(apiKey, apiUrl); ``` > The API_URL that you will be using depends on your environment. For example: > > - For Sandbox environments, use > > ```http > https://sandbox.esignlive.com/api > ``` > - For Production environments, use > > ```http > https://apps.esignlive.com > ``` > > For more information, see [Environment URLs and IP Addresses](/v1/docs/environment-urls-ip-addresses). Next, create a new PackageId object using a static PackageId string. Normally this would be generated dynamically, but for this example a static value is used. The following code will do this: ```csharp PackageId packageId = new PackageId("PACKAGE_ID"); ``` Then create of list of audit information and your list iterator. ```csharp List myaudit = eslClient.AuditService.GetAudit(packageId); List.Enumerator myenum = myaudit.GetEnumerator(); ``` Finally, you can use a loop to navigate through the list of Audit information. With each loop, the different property values are printed to the console. ```csharp while(myenum.MoveNext()) {     Debug.WriteLine("DateTime - " + myenum.Current.dateTime + ", Type - " + myenum.Current.type + ", User - " +    myenum.Current.user + ", Email - " + myenum.Current.email + ", IP - " + myenum.Current.ip + ", Target - " + myenum.Current.target + ", Data - " + myenum.Current.data); } ``` #### Results Here is an example of what you can expect to see once you have run your code. ![](https://cdn.document360.io/038f59a7-abd0-4c14-9de7-3434d28b49fd/Images/Documentation/csharpgetauditoutput-300x76.png?sv=2026-02-06&spr=https&st=2026-11-04T04%3A59%3A11Z&se=2026-11-04T05%3A59%3A11Z&sr=c&sp=r&sig=FhhoG6dzziTiTk63BfrX81ViPY2%2BzDKAroDnBc6FuCA%3D) ## REST API To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/audit-trail-example-rest-api/) site. A document’s Audit Trail contains the digital certificate used to sign, as well as the signature block image, time stamp and unique signer identification information. The document and the e-signatures it contains are tamper-sealed with a digital signature to guarantee the integrity and authenticity of the e-signed record. Especially relevant in a multi-signer process, OneSpan Sign independently time stamps and locks down each signature and any data entered by each signer independently of the others. So when you review the audit trail even years later, it is clear who signed what, in what order, at what time, etc. ### Retrieving an Audit Trail To retrieve the audit trail of a package, you will need the PackageId, which is returned to you during package creation. #### HTTP Request ```http GET /api/packages/{packageId}/audit ``` #### HTTP Headers ```http Accept: application/json Content-Type: application/json Authorization: Basic api_key ``` #### Response Payload ```json {  "package-id": "c2e57376-7391-4559-8da9-5d0ed4a24c56",  "audit-events": [    {      "type": "Signing Session For Signer",      "date-time": "2016-04-20 14:14:51",      "target": "signing url group",      "user": "somegroup",      "user-email": "9fe0d028-0572-4731-8520-99191340d78f@groups.esignlive.com",      "user-ip": "11.11.111.111",      "data": "Signing session to signer : 9fe0d028-0572-4731-8520-99191340d78f@groups.esignlive.com(somegroup"    },    {      "type": "View",      "date-time": "2016-04-20 14:14:54",      "target": "doc1",      "user": "somegroup",      "user-email": "9fe0d028-0572-4731-8520-99191340d78f@groups.esignlive.com",      "user-ip": "11.11.111.111",      "data": null    },    {      "type": "Click To Sign",      "date-time": "2016-04-20 14:23:31",      "target": "doc1",      "user": "somegroup",      "user-email": "9fe0d028-0572-4731-8520-99191340d78f@groups.esignlive.com",      "user-ip": "11.11.111.111",      "data": "Approval: FAPOezPt0H8E"    },    {      "type": "View",      "date-time": "2016-04-20 15:20:47",      "target": "doc1",      "user": "Haris Haidary",      "user-email": "esl.signer1@example.com",      "user-ip": "11.11.111.111",      "data": null    },    {      "type": "View",      "date-time": "2016-04-20 15:23:52",      "target": "doc1",      "user": "Haris Haidary",      "user-email": "esl.signer1@example.com",      "user-ip": "11.11.111.111",      "data": null    },    {      "type": "View",      "date-time": "2016-04-20 15:44:41",      "target": "doc1",      "user": "Haris Haidary",      "user-email": "esl.signer1@example.com",      "user-ip": "11.11.111.111",      "data": null    },    {      "type": "View",      "date-time": "2016-04-20 15:44:47",      "target": "doc1",      "user": "Haris Haidary",      "user-email": "esl.signer1@example.com",      "user-ip": "11.11.111.111",      "data": null    }  ] } ``` ### Retrieving a list of image URLs for IDV Evidence Summary You may need to retrieve a list of image URLs for signers who use ID Verification (IDV). The resulting list could the URLs for the document image, or a selfie image. To retreive a list of image url(s), you will need the PackageId, which is returned to you during package creation. #### HTTP Request ```http GET /api/packages/{packageId}/audit/idv/dvrImageUrls ``` #### HTTP Headers ```http Accept: application/json Content-Type: application/json Authorization: Basic api_key ``` #### Response Payload ```json [    {        "signerName": "Signer Name",        "email": "signerEmail@mailinator.com",        "idvImages": {            "": {                "idvTransactionId": "", "attemptNumber": ,                "imageInformationList": [                    {                        "type": "PassportDataPage",                        "detail": "",                        "url": "image url for download purpose"                    }                ]            }        }    },    {        "signerName": "Signer Name",        "email": "signerEmail@mailinator.com",        "idvImages": {            "": {                "idvTransactionId": "", "attemptNumber": ,                "imageInformationList": [                    {                        "type": "PassportDataPage",                        "detail": "",                        "url": "image url for download purpose"                    }                ]            }        }    },    ...... ] ``` ### Retrieving a Signer Image for the IDV Evidence Summary You may need to retrieve an image of a signer who used ID Verification (IDV). The resulting list could the URLs for the document image, or a selfie image. To retreive a list of image url(s), you will need the PackageId, IDV Transaction ID, and the Image URL which can be found by [Retrieving a list of image URLs for IDV Evidence Summary](/v1/docs/retrieving-an-audit-trail#retrieving-a-list-of-image-urls-for-idv-evidence-summary) . #### HTTP Request ```http GET /api/packages/{packageId}/audit/idv/dvrSignerImage?idvTransactionId={idvTransactionId}&imageUrl={imageUrl} ``` #### HTTP Headers ```http Authorization: Basic api_key ``` #### Response Payload The required image, in binary format. ### Retrieving an IDV Evidence Summary in JSON format The IDV Evidence Summary contains the following: - The signer's personal information - Document information - The summary and details of the verification result #### HTTP Request ```http GET /api/packages/{packageId}/audit/idv ``` #### HTTP Headers ```http Accept: application/json Content-Type: application/json Authorization: Basic api_key ``` #### Response Payload ```json {    "package-id": "-IpfLqlL39APrbpZ3M_Nx9o6Iq0=","idv-audit-trail": [        {            "signerName": "Signer Name", "signerId": "Signer Id",            "idvSupplementalInformationMap": {                "": { "attemptNumber": ,                    "idVerificationAttemptWithResult": {                        "result": "Passed",                        "created": "2023-06-13 14:41:52.603",                        "idVerificationAttempts": [                            {                                "matchType": "Full Name",                                "submitted": "Submitted Signer Name",                                "extracted": "Extracted Signer Name",                                "score": "1.0",                                "threshold": "0.8",                                "affectStatus": "Yes",                                "status": "Passed"                            },                            {                                "matchType": "Expiry Date",                                "submitted": "2022-10-10",                                "extracted": "2024-10-10",                                "score": "N/A",                                "threshold": "N/A",                                "affectStatus": "Yes",                                "status": "Passed"                            }                        ]                    },                    "idVerificationPersonalInformationList": [                        {                            "zone": "MergedZones",                            "firstName": "First Name",                            "lastName": "Last Name",                            "dob": "1980-10-10",                            "gender": "Female",                            "nationality": null,                            "address": null                        }                    ],                    "idVerificationDocInformationList": [                        {                            "zone": "MergedZones",                            "type": "DriverLicense",                            "issuingAuthority": "DVLA",                            "issuingCountry": "GB",                            "issuingState": null,                            "nationality": null,                            "number": "DriverLicense Number",                            "identificationNumber": null,                            "expiryDate": "2028-01-12",                            "issueDate": "2018-01-12"                        }                    ]                }            }        }    ] } ``` ## APEX SDK To download the full code sample see our [Code Share](https://community.onespan.com/documentation/onespan-sign/codeshare/audit-trail-example-apex-sdk/) site. A document’s Audit Trail contains the digital certificate used to sign, as well as the signature block image, time stamp and unique signer identification information. The document and the e-signatures it contains are tamper-sealed with a digital signature to guarantee the integrity and authenticity of the e-signed record. Especially relevant in a multi-signer process, OneSpan Sign independently time stamps and locks down each signature and any data entered by each signer independently of the others. So when you review the audit trail even years later, it is clear who signed what, in what order, at what time, etc. First, retrieve the list of Audit information by using the following encapsulated function. Use your packageId as the parameter. ```plaintext public List getAudit(String packageId) ``` Then, you can use a loop to navigate through the list of Audit information. With each loop, the different property values are printed to the console. ```plaintext List auditList = getAudit(packageId); for(TestAuditService.Audit audit: auditList){     System.debug('DateTime - ' + audit.date_time + ', Type - ' + audit.type + ', User - ' +  audit.user + ', Email -' + audit.user_email + ', IP - ' + audit.user_ip + ', Target - ' + audit.target + ', Data - ' + audit.data); } ``` ### Results Here is an example of what you can expect to see once you have run your code. ![](https://cdn.document360.io/038f59a7-abd0-4c14-9de7-3434d28b49fd/Images/Documentation/apex-guides-audit-service.png?sv=2026-02-06&spr=https&st=2026-11-04T04%3A59%3A11Z&se=2026-11-04T05%3A59%3A11Z&sr=c&sp=r&sig=FhhoG6dzziTiTk63BfrX81ViPY2%2BzDKAroDnBc6FuCA%3D)