1
0
Fork 0
arangodb/Documentation/Books/Users/HttpBulkImports
Thomas Schmidts 4bf4a9bb26 Changed README.html to index.html in the documentation 2015-06-09 09:40:12 +02:00
..
ImportingHeadersAndValues.mdpp Changed README.html to index.html in the documentation 2015-06-09 09:40:12 +02:00
ImportingSelfContained.mdpp the great rename: array => object, list => array 2014-12-18 22:33:23 +01:00
README.mdpp Changed README.html to index.html in the documentation 2015-06-09 09:40:12 +02:00

README.mdpp

!CHAPTER HTTP Interface for Bulk Imports

ArangoDB provides an HTTP interface to import multiple documents at once into a
collection. This is known as a bulk import.

The data uploaded must be provided in JSON format. There are two mechanisms to
import the data:

* self-contained JSON documents: in this case, each document contains all 
  attribute names and values. Attribute names may be completely different
  among the documents uploaded
* attribute names plus document data: in this case, the first array must 
  contain the attribute names of the documents that follow. The following arrays
  containing only the attribute values. Attribute values will be mapped to the 
  attribute names by positions.

The endpoint address is */_api/import* for both input mechanisms. Data must be
sent to this URL using an HTTP POST request. The data to import must be
contained in the body of the POST request.

The *collection* URL parameter must be used to specify the target collection for
the import. The optional URL parameter *createCollection* can be used to create
a non-existing collection during the import. If not used, importing data into a
non-existing collection will produce an error. Please note that the *createCollection*
flag can only be used to create document collections, not [edge collections](../Glossary/index.html#edge_collection).

The *waitForSync* URL parameter can be set to *true* to make the import only 
return if all documents have been synced to disk.

The *complete* URL parameter can be set to *true* to make the entire import fail if
any of the uploaded documents is invalid and cannot be imported. In this case,
no documents will be imported by the import run, even if a failure happens at the
end of the import. 

If *complete* has a value other than *true*, valid documents will be imported while 
invalid documents will be rejected, meaning only some of the uploaded documents 
might have been imported.

The *details* URL parameter can be set to *true* to make the import API return
details about documents that could not be imported. If *details* is *true*, then
the result will also contain a *details* attribute which is an array of detailed
error messages. If the *details* is set to *false* or omitted, no details will be
returned.