Download Document File
GET
/api/{version}/objects/documents/{doc_id}/fileHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{doc_id} | The document id field value. |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
lockDocument | Set to true to Check Out this document before retrieval. If omitted, defaults to false. |
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v17.3/objects/documents/534/file?lockDocument=false > fileResponse
Section link for ResponseContent-Type: application/octet-stream;charset=UTF-8
Content-Disposition: attachment;filename="CholeCap-Presentation.pptx"Response Details
Section link for Response DetailsOn SUCCESS, Vault retrieves the latest version of the source file from the document. The HTTP Response Header Content-Type is set to application/octet-stream. The HTTP Response Header Content-Disposition contains a filename component which can be used when naming the local file.