Load Data Objects
POST
/api/{version}/services/loader/loadCreate a loader job load a set of data files.
Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json |
Accept | 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_type | The type of data object to load. The following values are allowed:
|
object | If the object_type = vobjects__v, include the object name. For example, product__v. |
action | The action type to create, update, upsert, or delete objects or object record roles. |
file | Include the filepath to reference the load file on the FTP server. |
order | Specifies the order of the load task. |
idparam | Optional: Identify object records by any unique field value. Can only be used if object_type is vobjects__v, action is upsert, update, or delete, and the specified object field has unique set to true in the object metadata. |
X-VaultAPI-MigrationMode | Optional: Set to true to create object records in a specific state or state type for objects with lifecycles. If not specified, records will be created in their initial state. X-VaultAPI-MigrationMode can only be used if object_type is vobjects__V and action is create. You must have the Record Migration permission to use this parameter. |
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\load_objects.json" \
https://myveevavault.com/api/v20.1/services/loader/load[
{
"object_type": "documents__v",
"action": "create",
"file": "documents.csv",
"order": 1
},
{
"object_type": "vobjects__v",
"object": "product__v",
"action": "upsert",
"file": "products.csv",
"order": 2,
"idparam": "external_id__v"
},
{
"object_type": "vobjects__v",
"object": "annotation_keywords__sys",
"action": "create",
"file": "claims.csv",
"order": 3,
"X-VaultAPI-MigrationMode": true
},
{
"object_type": "groups__v",
"action": "update",
"file": "groups.csv",
"order": 4
}
]Response
Section link for Response{
"responseStatus": "SUCCESS",
"url": "/api/v20.1/services/jobs/192102",
"job_id": 192102,
"tasks": [
{
"task_id": "1",
"object_type": "documents__v",
"action": "create",
"file": "documents.csv"
},
{
"task_id": "2",
"object_type": "vobjects__v",
"object": "product__v",
"action": "upsert",
"idparam": "external_id__v",
"file": "products.csv"
},
{
"task_id": "3",
"object_type": "vobjects__v",
"object": "annotation_keywords__sys",
"action": "create",
"X-VaultAPI-MigrationMode": true,
"file": "claims.csv"
},
{
"task_id": "4",
"object_type": "groups__v",
"action": "update",
"file": "groups.csv"
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes the following information: