**Source URL:** https://general.veevavault.dev/regulatory/vault-api/api-reference/26.1/logs/audit-history/retrieve-complete-audit-history-for-a-single-document.md

# Retrieve Complete Audit History for a Single Document



Retrieve complete audit history for a single document.

<Endpoint path="/api/{version}/objects/documents/{doc_id}/audittrail" method="GET"></Endpoint>

## Headers {#headers}

| Name | Description |
| --- | --- |
| `Accept` | `application/json` (default) |

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{doc_id}` | The document ID for which to retrieve audit history. |
</FieldTable>

## Query Parameters {#query-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `start_date` | Specify a start date to retrieve audit history. Dates must be `YYYY-MM-DDTHH:MM:SSZ` format, for example, 7AM on January 15, 2018 would use `2018-01-15T07:00:00Z`. If omitted, defaults to the Vault's creation date. |
| `end_date` | Specify an end date to retrieve audit history. Dates must be `YYYY-MM-DDTHH:MM:SSZ` format, for example, 7AM on January 15, 2018 would use `2018-01-15T07:00:00Z`. If omitted, defaults to today's date. |
| `format_result` | To request a CSV file of your audit history, use `csv`. The CSV file ignores the `start_date` and `end_date`. |
| `events` | Provide a comma-separated list of one or more audit events to retrieve their audit history. See Vault Help for a full list of [document audit events](https://platform.veevavault.help/en/gr/30435). The values passed to this parameter are case sensitive. For example, `events=WorkflowCompletion,TaskAssignment`. If omitted, defaults to all audit events. |
</FieldTable>
Dates and times are in UTC. If the time is not specified, it will default to midnight (T00:00:00Z) on the specified date.

## Request {#request}

<CodeExample title="">
```
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v21.2/objects/documents/42/audittrail?start_date=2021-04-22T23:00:00Z&end_date=2021-04-24T23:00:00Z

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "responseDetails": {
       "offset": 0,
       "limit": 200,
       "size": 2,
       "total": 2,
       "object": {
           "name": "document_audit_trail",
           "label": "Document Audit Trail",
           "url": "/api/v21.2/metadata/audittrail/document_audit_trail"
       }
   },
   "data": [
       {
           "id": "404",
           "timestamp": "2021-04-23T23:28:38Z",
           "user_name": "olive@veepharm.com",
           "full_name": "Olivia Cattington",
           "action": "EditDocRelationships",
           "item": "VV-00016",
           "field_name": "Supporting Documents",
           "old_value": null,
           "new_value": "VV-00003",
           "workflow_name": null,
           "task_name": null,
           "signature_meaning": null,
           "view_license": null,
           "job_instance_id": null,
           "doc_id": "42",
           "version": "0.1",
           "document_url": "/ui/#doc_info/42/0/1",
           "event_description": "\"VV-00003\" was added as a \"Supporting Documents\" relation"
       },
       {
           "id": "403",
           "timestamp": "2021-04-23T23:28:04Z",
           "user_name": "olive@veepharm.com",
           "full_name": "Olivia Cattington",
           "action": "GetDocumentVersion",
           "item": "VV-00016",
           "field_name": null,
           "old_value": null,
           "new_value": null,
           "workflow_name": null,
           "task_name": null,
           "signature_meaning": null,
           "view_license": null,
           "job_instance_id": null,
           "doc_id": "42",
           "version": "0.1",
           "document_url": "/ui/#doc_info/42/0/1",
           "event_description": "Viewed Document"
       }
   ]
}

```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, the response includes some of the following metadata:

<FieldTable>
| Name | Description |
| --- | --- |
| `action` | The name of the action performed on the document. For example, `EditDocRelationships`. |
| `item` | The document number field value. |
| `signature_meaning` | The reason a signature was required for any manifested signature. |
| `view_license` | Returns a value of `View-Based User` only when the user is assigned that license type. Otherwise, returns an empty string. |
| `event_description` | Description of the action that occurred, for example, "Viewed Document". Note that when data changes, the description shows both the previous value and the new value. |
</FieldTable>
When the number of query results is greater than the page size, the response provides `next_page` and `previous_page` URLs for pagination. Learn more about paginating results in the [VQL documentation](/vql/references/query-performance-best-practices#Paginating_Results).



---

**Previous:** [Audit History](/regulatory/vault-api/api-reference/26.1/logs/audit-history)  
**Next:** [Retrieve Complete Audit History for a Single Object Record](/regulatory/vault-api/api-reference/26.1/logs/audit-history/retrieve-complete-audit-history-for-a-single-object-record)