Export Documents
Use this request to export a set of documents to your Vault's file staging.
POST
/api/{version}/objects/documents/batch/actions/fileextractHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body ParametersPrepare a JSON input file with the following body parameters:
| Name | Description |
|---|---|
idrequired | The id value of the document(s) to export. |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
source | Optional: To exclude source files, include a query parameter source=false. If omitted, defaults to true. |
renditions | Optional: To include renditions, include a query parameter renditions=true. If omitted, defaults to false. |
allversions | Optional: To include all versions, include a query parameter allversions=true. If omitted, defaults to false, which only includes the latest version. |
text | Optional: To include source document text, include a query parameter text=true. If omitted, defaults to false, which does not include source document text.Can be used with allversions to include document text for all versions or the latest version. For example, text=true&allversions=true includes all text files from all versions of the requested document. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-raw '[
{
"id": "58"
},
{
"id":"134"
},
{
"id":"122"
}
]' \
https://myvault.veevavault.com/api/v26.1/objects/documents/batch/actions/fileextract?source=true&renditions=false&allversions=trueResponse
Section link for Response{
"responseStatus": "SUCCESS",
"url": "/api/v26.1/services/jobs/36203",
"job_id": "36203"
}Response Details
Section link for Response DetailsOn SUCCESS, this operation exports the specified set of documents to your Vault’s file staging. When exporting source document text, the source document text files appear as "text_file.txt" within their respective document version folders. The response includes the following information:
| Field Name | Description |
|---|---|
job_id | The Job ID value to retrieve the status and results of the document export request. |
url | URL to retrieve the current job status of the document export request. |