/_api/import` with `type=documents` and `complete=true` commits a partial import when a line is not valid JSON
Author: the-ShallowCreated Oct 1, 2026Updated Oct 1, 2026
Description
complete=true is documented as "the whole import fails if any error occurs". With line-wise input
(type=documents, or type=auto on line-wise input), a line that cannot be parsed is counted as an error, the
documents before it are committed, and the server answers 201. The other formats abort and store nothing.
Reproduction
curl -s -X POST localhost:8529/_api/collection -d '{"name":"atomic"}'
printf '{"_key":"a"}\nNOT JSON' | \
curl -s -X POST 'localhost:8529/_api/import?collection=atomic&type=documents&complete=true' --data-binary @-
# 201 {"error":false,"created":1,"errors":1,...}
curl -s -X POST localhost:8529/_api/cursor -d '{"query":"FOR d IN atomic RETURN d._key"}'
# ["a"] expected []Source: arangodb/arangodb