--space, or ANONA_SPACE_ID.
documents upload
Ingestion is always asynchronous. Without
--wait the command prints the job
ids and exits 0 as soon as the server has accepted the files; check them with
anona jobs get. With --wait it polls until every job finishes:
0 all completed, 1 one failed or was cancelled, 8 still running when the
wait ran out. An upload does not report “nothing stored” (exit 3): its job
carries no item count to judge that by.
A path that is not a readable file exits 2 before anything is sent. The
server’s limits are 20 files, 25 MB per file (64 MB for video), and 50 MB per
request (100 MB with video); past them, or for a type it cannot read, the
command exits 1 with the server’s code (unsupported_file_type,
file_too_large, upload_too_large, file_type_mismatch,
file_expands_too_much) and a message naming the limit. Uploading to a space
that does not exist creates it.
--json: {"job_ids": [...]}. With --wait:
{"submitted": {"job_ids": [...]}, "jobs": [<one jobs get document per job>]}.
documents list
--json: {"documents": [{"document_id", "source", "created_at", "memory_count", "tags"}], "total", "limit", "offset"}.
documents get
--json: the document’s metadata object, as the API returns it.
documents delete
--yes it
exits 2 and sends nothing.
--json: {"deleted": true, "document_id", "space_id"}, written by the
CLI (the API answers with no body).