Retrieve Document Attachments
GET
/api/{version}/objects/documents/{doc_id}/attachmentsHeaders
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. |
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachmentsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"id": 566,
"filename__v": "Site Area Map.png",
"format__v": "image/png",
"size__v": 109828,
"md5checksum__v": "78b36d9602530e12051429e62558d581",
"version__v": 2,
"created_by__v": 46916,
"created_date__v": "2015-01-14T00:35:01.775Z",
"versions": [
{
"version__v": 1,
"url": "https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachments/566/versions/1"
},
{
"version__v": 2,
"url": "https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachments/566/versions/2"
}
]
},
{
"id": 567,
"filename__v": "Site Facilities Contacts.docx",
"format__v": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"size__v": 11483,
"md5checksum__v": "bddd2e18f40dd09ab4939ddd2acefeac",
"version__v": 3,
"created_by__v": 46916,
"created_date__v": "2015-01-14T00:35:12.320Z",
"versions": [
{
"version__v": 1,
"url": "https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachments/567/versions/1"
},
{
"version__v": 2,
"url": "https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachments/567/versions/2"
},
{
"version__v": 3,
"url": "https://myvault.veevavault.com/api/v23.1/objects/documents/565/attachments/567/versions/3"
}
]
}
]
}Response Details
Section link for Response DetailsShown above, document id 565 has two different attachments. Attachment id 566 is an image file with two versions. Attachment id 567 is a Word document with three versions. Unlike "regular" document versioning, attachment versioning uses integer numbers beginning with 1 and incrementing sequentially (1, 2, 3,...). There is no concept of major or minor version numbers with attachments.