Appwrite DocumentsDB API
DocumentsDB — schemaless document storage with documents that evolve with the application, announced 2026-09-02. 36 operations across 18 paths in the Appwrite 2.0.0 OpenAPI.
Operations 36
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which DocumentsDB databases exist in my project?”
“Can I filter my list of databases with queries?”
Tell an agent
List all document databases in this project.
List the databases matching {queries}.
Ask an LLM
“How do I create a new document database?”
“Can I provision a dedicated database with high-availability replicas instead of serverless?”
Tell an agent
Create a database named {name} with ID {databaseId}.
Create dedicated database {databaseId} called {name} on specification {specification} with {replicas} replicas.
Ask an LLM
“What dedicated database sizes can I choose on my plan?”
“How much does each dedicated database specification cost, including overage?”
Tell an agent
Show the dedicated database specifications available on my plan.
Compare the resource limits and prices of each database specification.
Ask an LLM
“Which transactions are currently open across my databases?”
“Can I filter the transactions list with queries?”
Tell an agent
List all transactions across my databases.
List transactions matching {queries}.
Ask an LLM
“How do I start a transaction so several document writes succeed or fail together?”
“Can I set how long a transaction lives before it expires?”
Tell an agent
Begin a new database transaction.
Start a transaction that expires after {ttl} seconds.
Ask an LLM
“What state is a specific transaction in?”
“Can I look up one transaction by its ID?”
Tell an agent
Show transaction {transactionId}.
Check whether transaction {transactionId} is still open.
PATCH
/documentsdb/transactions/{transactionId}
Commit or roll back a transaction · Update transaction
#
Ask an LLM
“How do I commit the staged changes in a transaction?”
“Can I roll back a transaction instead of committing it?”
Tell an agent
Commit transaction {transactionId}.
Roll back transaction {transactionId} with rollback set to {rollback}.
Ask an LLM
“How do I throw away a transaction record entirely?”
“Can a transaction be removed by its ID?”
Tell an agent destructive · confirm first
Delete transaction {transactionId}.
Remove the transaction record {transactionId} permanently.
POST
/documentsdb/transactions/{transactionId}/operations
Stage several writes in a transaction · Create operations
#
Ask an LLM
“How do I add a batch of staged writes to an open transaction?”
“Can I queue multiple document changes in one call inside a transaction?”
Tell an agent
Stage these operations in transaction {transactionId}: {operations}.
Add a batch of staged writes to transaction {transactionId}.
Ask an LLM
“What are the settings of one particular database?”
“Can I fetch a database's metadata by its ID?”
Tell an agent
Show the metadata for database {databaseId}.
Fetch database {databaseId} and tell me whether it is enabled.
Ask an LLM
“How do I rename a database or disable it?”
“Can I change the replica count or sync mode of an existing dedicated database?”
Tell an agent
Rename database {databaseId} to {name}.
Set database {databaseId} named {name} to {replicas} replicas with sync mode {syncMode}.
Ask an LLM
“How do I delete an entire database?”
“What API key scope is needed to delete a database?”
Tell an agent destructive · confirm first
Delete database {databaseId}.
Permanently remove database {databaseId} and everything in it.
Ask an LLM
“Which collections does a database contain?”
“Can I search a database's collections by name?”
Tell an agent
List the collections in database {databaseId}.
Search collections in database {databaseId} for {search}.
Ask an LLM
“How do I create a new collection inside a database?”
“Can I define attributes and indexes when first creating a collection?”
Tell an agent
Create collection {name} with ID {collectionId} in database {databaseId}.
Create collection {collectionId} named {name} in database {databaseId} with document-level security {documentSecurity}.
GET
/documentsdb/{databaseId}/collections/{collectionId}
Get a collection's metadata · Get collection
#
Ask an LLM
“What permissions and settings does one collection have?”
“Can I retrieve a collection's metadata by ID?”
Tell an agent
Show collection {collectionId} in database {databaseId}.
Tell me whether document security is on for collection {collectionId} in database {databaseId}.
PUT
/documentsdb/{databaseId}/collections/{collectionId}
Update a collection's settings · Update collection
#
Ask an LLM
“How do I rename a collection or change its permissions?”
“Can I purge a collection's cached list results while updating it?”
Tell an agent
Rename collection {collectionId} in database {databaseId} to {name}.
Update collection {collectionId} in database {databaseId}, keep name {name}, and purge its cached lists.
DELETE
/documentsdb/{databaseId}/collections/{collectionId}
Delete a collection · Delete collection
#
Ask an LLM
“How do I delete a whole collection?”
“Who is allowed to delete a collection?”
Tell an agent destructive · confirm first
Delete collection {collectionId} from database {databaseId}.
Drop the collection {collectionId} in database {databaseId} permanently.
GET
/documentsdb/{databaseId}/collections/{collectionId}/documents
List or query documents in a collection · List documents
#
Ask an LLM
“How do I fetch documents from a collection with filters?”
“Can I read uncommitted changes inside a transaction when listing documents?”
Tell an agent
List documents in collection {collectionId} of database {databaseId}.
Find documents in collection {collectionId} of database {databaseId} matching {queries}.
POST
/documentsdb/{databaseId}/collections/{collectionId}/documents
Create a new document · Create document
#
Ask an LLM
“How do I add a new document to a collection?”
“Can I set permissions on a document when I create it?”
Tell an agent
Create document {documentId} with data {data} in collection {collectionId} of database {databaseId}.
Insert a new document {documentId} containing {data} into collection {collectionId} of database {databaseId} with permissions {permissions}.
PUT
/documentsdb/{databaseId}/collections/{collectionId}/documents
Create or update many documents at once · Upsert documents
#
Ask an LLM
“How do I bulk upsert a batch of documents into a collection?”
“Can I insert-or-update several documents in one request?”
Tell an agent
Upsert these documents into collection {collectionId} of database {databaseId}: {documents}.
Bulk upsert {documents} into collection {collectionId} of database {databaseId} within transaction {transactionId}.
PATCH
/documentsdb/{databaseId}/collections/{collectionId}/documents
Bulk update documents matching a query · Update documents
#
Ask an LLM
“How do I change a field on every document that matches a filter?”
“Can I bulk-update only specific fields across many documents?”
Tell an agent
Set {data} on all documents in collection {collectionId} of database {databaseId} matching {queries}.
Apply {data} to every document in collection {collectionId} of database {databaseId}.
DELETE
/documentsdb/{databaseId}/collections/{collectionId}/documents
Bulk delete documents by query · Delete documents
#
Ask an LLM
“How do I delete every document matching a filter?”
“What happens if I bulk delete documents without any queries?”
Tell an agent destructive · confirm first
Delete all documents in collection {collectionId} of database {databaseId} matching {queries}.
Empty collection {collectionId} in database {databaseId} of all documents.
GET
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}
Get one document by ID · Get document
#
Ask an LLM
“How do I read a single document when I know its ID?”
“Can I read a document's uncommitted version inside a transaction?”
Tell an agent
Get document {documentId} from collection {collectionId} of database {databaseId}.
Read document {documentId} in collection {collectionId} of database {databaseId} as seen by transaction {transactionId}.
PUT
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}
Create or replace a single document · Upsert a document
#
Ask an LLM
“How do I write a document by ID whether or not it already exists?”
“Can I upsert one document and set its permissions at the same time?”
Tell an agent
Upsert document {documentId} in collection {collectionId} of database {databaseId} with {data}.
Create document {documentId} in collection {collectionId} of database {databaseId} if missing, otherwise overwrite it with {data}.
PATCH
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}
Partially update one document · Update document
#
Ask an LLM
“How do I change just a few fields on an existing document?”
“Can I update a single document's permissions without touching its data?”
Tell an agent
Update document {documentId} in collection {collectionId} of database {databaseId} with {data}.
Change the permissions of document {documentId} in collection {collectionId} of database {databaseId} to {permissions}.
DELETE
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}
Delete a single document · Delete document
#
Ask an LLM
“How do I delete one document by its ID?”
“Can I stage a single document deletion inside a transaction?”
Tell an agent destructive · confirm first
Delete document {documentId} from collection {collectionId} of database {databaseId}.
Remove document {documentId} in collection {collectionId} of database {databaseId} as part of transaction {transactionId}.
PATCH
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement
Decrement a numeric field on a document · Decrement document attribute
#
Ask an LLM
“How do I atomically subtract from a counter on a document?”
“Can I stop a decrement from going below a minimum value?”
Tell an agent
Decrease {attribute} on document {documentId} in collection {collectionId} of database {databaseId} by {value}.
Decrement {attribute} of document {documentId} in collection {collectionId}, database {databaseId}, but not below {min}.
PATCH
/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment
Increment a numeric field on a document · Increment document attribute
#
Ask an LLM
“How do I atomically add to a counter on a document?”
“Can I cap an increment at a maximum value?”
Tell an agent
Increase {attribute} on document {documentId} in collection {collectionId} of database {databaseId} by {value}.
Increment {attribute} of document {documentId} in collection {collectionId}, database {databaseId}, up to at most {max}.
GET
/documentsdb/{databaseId}/collections/{collectionId}/indexes
List a collection's indexes · List indexes
#
Ask an LLM
“Which indexes are defined on a collection?”
“Can I filter a collection's index list with queries?”
Tell an agent
List the indexes on collection {collectionId} in database {databaseId}.
Show indexes on collection {collectionId} in database {databaseId} matching {queries}.
POST
/documentsdb/{databaseId}/collections/{collectionId}/indexes
Create an index on a collection · Create index
#
Ask an LLM
“How do I add an index so my document queries run faster?”
“Can I create a unique or fulltext index across several attributes?”
Tell an agent
Create a {type} index {key} on {attributes} in collection {collectionId} of database {databaseId}.
Add a unique index {key} over {attributes} to collection {collectionId} in database {databaseId} with type {type}.
GET
/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key}
Get an index's definition · Get index
#
Ask an LLM
“What attributes does a particular index cover?”
“Can I look up one index on a collection by its key?”
Tell an agent
Show index {key} on collection {collectionId} in database {databaseId}.
Tell me which attributes index {key} covers in collection {collectionId}, database {databaseId}.
DELETE
/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key}
Delete an index · Delete index
#
Ask an LLM
“How do I drop an index I no longer need?”
“Can I remove an index from a collection by key?”
Tell an agent destructive · confirm first
Delete index {key} from collection {collectionId} in database {databaseId}.
Drop the {key} index on collection {collectionId}, database {databaseId}.
POST
/documentsdb/{databaseId}/failovers
Fail over a dedicated database to a replica · Create failover
#
Ask an LLM
“How do I manually promote a replica to primary on my dedicated database?”
“Can I repair a database stuck mid-operation by forcing a failover?”
Tell an agent
Trigger a failover on dedicated database {databaseId}.
Fail over database {databaseId} and promote replica {targetReplicaId}.
GET
/documentsdb/{databaseId}/operations
List a dedicated database's lifecycle history · List operations
#
Ask an LLM
“What provisioning, backup and restore actions have run on my dedicated database?”
“Can I see only the failed lifecycle actions for a database?”
Tell an agent
Show the lifecycle history of dedicated database {databaseId}, newest first.
List the last {limit} lifecycle actions on database {databaseId} with status {status}.
Ask an LLM
“How far behind are my database replicas?”
“What sync mode is my high-availability database using?”
Tell an agent
Show the replica statuses and replication lag for database {databaseId}.
Check the high-availability setup of database {databaseId}.
Ask an LLM
“Is my dedicated database healthy and ready right now?”
“What are the uptime, connection info and volume usage of my database?”
Tell an agent
Check the health of dedicated database {databaseId}.
Show uptime, readiness and volume info for database {databaseId}.