Retrieve Complete Audit History for a Single Document
Retrieve complete audit history for a single document.
GET
/api/{version}/objects/documents/{doc_id}/audittrailHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
start_date | Specify a start date to retrieve audit history. This date cannot be more than 30 days ago. 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. This date cannot be more than 30 days ago. 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. |
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
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.1/objects/documents/8/audittrailResponse
Section link for Response{
"responseDetails": {
"offset": 0,
"limit": 200,
"size": 72,
"total": 72,
"object": {
"name": "document_audit_trail",
"label": "Document Audit Trail",
"url": "/api/v19.1/metadata/audittrail/document_audit_trail"
}
},
"data": [
{
"id": "2004",
"timestamp": "2018-09-07T21:02:25Z",
"user_name": "s.tate@veepharm.com",
"full_name": "Sean Tate",
"action": "GetDocumentVersion",
"item": "PM-US-CC-0008",
"field_name": "",
"workflow_name": "",
"task_name": "",
"signature_meaning": "",
"view_license": "",
"job_instance_id": "",
"doc_id": "8",
"version": "0.1",
"document_url": "/ui/#doc_info/8/0/1",
"event_description": "Viewed Document"
},
{
"id": "2000",
"timestamp": "2018-09-07T21:02:03Z",
"user_name": "System",
"full_name": "System",
"action": "EditDocRelationships",
"item": "PM-US-CC-0008",
"field_name": "Claims Documents",
"old_value": "CD-00001",
"workflow_name": "",
"task_name": "",
"signature_meaning": "",
"view_license": "",
"job_instance_id": "",
"doc_id": "8",
"version": "0.1",
"document_url": "/ui/#doc_info/8/0/1",
"event_description": "\"CD-00001\" was removed as a \"Claims Documents\" relation"
}
],
"responseStatus": "SUCCESS"
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes some of the following metadata: