Endpoints and errors
Base address https://artemis.hsoni.dev/api/v1. Folders are created as you upload into them.
Scopes
A key has a folder and the scopes you tick when you make it. GET /keys/self shows what yours may do.
writeUpload, rename, move, create folders, restore from the trash.
Key's folderreadList, download, search, read protection and capacity.
Key's folderdeleteMove files to the trash. Never a permanent delete.
Key's folderindex:readSearch and index status across every storage.
Whole accountnodes:readNames and status of your storages. Never their logins.
Whole account
Endpoints
Uploads
- POST
/drive/uploadsStart an upload (1 byte to 300 MiB). Replaces an existing file.
write - POST
/drive/uploads/{id}/completeSay the file was sent. Artemis stores it.
write - GET
/drive/uploads/{id}State: created, queued, done or failed.
write | read - DELETE
/drive/uploads/{id}Abort an upload not yet completed.
write
Files and folders
- HEAD
/drive/files/{path}Size, ETag, SHA-256 and modified time.
write | read - GET
/drive/files/{path}Download. Supports Range. Streams.
read - PATCH
/drive/files/{path}Rename or move a file or folder: { to }.
write - DELETE
/drive/files/{path}Move a file to the Drive trash.
delete - GET
/drive/filesList files under ?prefix=, 100 per page (max 1000), ?cursor=.
read - POST
/drive/foldersCreate a folder and its parents: { path }.
write - GET
/drive/treeOne level of a folder, with folders: ?path=.
read
Trash, search and capacity
- GET
/drive/searchSearch names inside the key's folder: ?q=.
read - GET
/drive/quotaCapacity of the storages the key can open.
read - GET
/drive/trashItems trashed from the key's folder.
read - POST
/drive/trash/{id}/restoreRestore a trashed item to where it was.
write
Protection
- GET
/drive/protectionCopies wanted and held for a file or folder: ?path=.
read
Search and index
- GET
/searchSearch every storage's file index (whole account).
index:read - GET
/index/statusState of the file index.
index:read
Storages
- GET
/nodesYour storages and their status, without logins.
nodes:read
Key
- GET
/keys/selfWhat this key may do.
any
Errors
Failures return { "error": "…", "code": "…" }.
- 400
INVALID_REQUEST · INVALID_BODY · INVALID_QUERY · INVALID_PATH · INVALID_CURSORBad body, query, path, prefix or cursor.
- 401
UNAUTHORIZEDWrong, revoked or expired key, blocked address, or a changed storage. Always the same answer.
- 403
FORBIDDEN · CAP_EXCEEDEDMissing scope, or the key's size limit is used up.
- 404
NOT_FOUNDNo such file, folder or upload, or the path is a folder.
- 409
EXISTS · IS_A_FOLDER · NOT_A_FOLDER · PARENT_GONE · ENCRYPTED_SCOPE · NO_STORAGE · NOT_UPLOADED · SIZE_MISMATCH · UPLOAD_FAILED · ABORTED · CANNOT_ABORTConflict with the file, folder or upload state. PARENT_GONE: the folder it was in is gone; restore it from the app.
- 412
PRECONDITION_FAILEDifMatch did not match the current file.
- 413
TOO_LARGEOver 300 MiB.
- 429
RATE_LIMITED · TOO_MANY_UPLOADSSlow down. Wait for Retry-After.
- 501
UPLOADS_UNAVAILABLEUploads are off right now. Don't retry.
- 502
UPLOAD_ERROR · STORAGE_ERROR · TRANSFER_FAILED · ASK_FAILEDA storage, transfer or the assistant failed. Retry shortly.
- 507
NO_SPACENo chosen storage has room.