Pepperi API Design
Search…
PEPPERI NOTIFICATION SERVICE
PFS - Pepperi File Service
Actions Queue
CPI Node
TODO training
Data Import
Import data to ADAL
post
https://api.pepperi.com
/v1.0/addons/data/import/{addonUUID}/{table}
Data import
Given an array of objects, pre-processes them using relations to prepare them for upload, and uploads them in batches using BatchUpsert.
  • Maximum input is 6MB
  • A single object cannot exceed 400KB
  • Maximum of 500 objects in input
Using this interface is only possible with tables that support Import/Export. In order to support Import/Export, please refer to the Import and export relations.

Overwrite

When uploading an object to the database using a "put" action, it will overwrite an existing object with the same key. Because of this, before uploading the object this function first checks if the object already exists in the database, and if so merges them together (overwriting only modified attributes) and only then uploads them.
This happens by default. If an addon wishes to import objects while completely overwriting any existing object in the database (i.e. bypass the merging process) it may also pass "Overwrite"=true in the body parameter.
If "Overwrite" = true, all successful uploads will be represented in the StatusObject returned as the Status: "Insert".

Input:

1
{
2
'Objects':
3
[
4
{
5
'Key': 'foo',
6
'Attribute1': 'something',
7
'Attribute2': 'something else'
8
},
9
{
10
//...
11
}
12
],
13
'Overwrite': false // false by default.
14
15
}
Copied!

Output:

Outputs an array of StatusObjects, each matching by index an input object (i.e. output[5] is a StatusObject corresponding to the input object input.Objects[5].
A StatusObject is an ImportedObjects without an internal object.
Automatically fills in values for the 'Key' attribute of the output StatusObjects, using the 'Key' values in the objects returned by the relation. If no such value exists, the output StatusObject will contain an empty 'Key' and the 'Status' will be 'Error' ("Table key must exist").
Last modified 21d ago
Copy link