Extract Data Files
Create a Loader job to extract one or more data files. Learn more about extracting data files with Vault Loader in Vault Help
POST
/api/{version}/services/loader/extractHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json |
Content-Type | application/json |
Body Parameters
Section link for Body ParametersThe body of your request should be a JSON file containing the set of data objects to extract.
| Name | Description |
|---|---|
object_typerequired | The type of data object to extract. The following values are allowed:
|
objectconditional | If object_type=vobjects__v, include the object name. For example, product__v. |
extract_optionsoptional | Include to specify whether or not to extract renditions and/or source files for the documents__v and document_versions__v object types. The following values are allowed:
|
fieldsrequired | A JSON array with the field information for the specified object type. For example, id, name__v, descriptions__v, etc. |
vql_criteria__voptional | A VQL-like expression used to optionally filter the data set to only those records that meet a specified criterion. Learn more about Criteria VQL |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
sendNotification | To send a Vault notification when the job completes, set to true. If omitted, this defaults to false and Vault does not send a notification when the job completes. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
--data-binary @"C:\Vault\Loader\extract_objects.json" \
https://myvault.veevavault.com/api/v24.2/services/loader/extract[
{
"object_type": "documents__v",
"extract_options": "include_renditions__v",
"fields":[
"id",
"name__v",
"type__v"
],
"vql_criteria__v":"site__v=123 MAXROWS 500 SKIP 100"
},
{ "object_type": "vobjects__v",
"object": "product__v",
"fields":[
"id",
"name__v",
"object_type__v"
],
"vql_criteria__v":"site__v=123 MAXROWS 500 SKIP 100"
},
{
"object_type": "groups__v",
"fields":[
"id",
"name__v"
]
}
]Response
Section link for Response{
"responseStatus": "SUCCESS",
"url": "/api/v24.2/services/jobs/61907",
"job_id": 61907,
"tasks": [
{
"task_id": "1",
"object_type": "documents__v",
"fields": [
"id",
"name__v",
"type__v"
],
"vql_criteria__v": "site__v=123 MAXROWS 500 SKIP 100",
"extract_options": "include_renditions__v"
},
{
"task_id": "2",
"object_type": "vobjects__v",
"object": "product__v",
"fields": [
"id",
"name__v",
"object_type__v"
],
"vql_criteria__v": "site__v=123 MAXROWS 500 SKIP 100"
},
{
"task_id": "3",
"object_type": "groups__v",
"fields": [
"id",
"name__v"
]
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes the following information: