Appwrite
  1. database
Appwrite
  • account
    • Delete Account
      DELETE
    • Get Account
      GET
    • Create Account
      POST
    • Update Account Email
      PATCH
    • Create Account JWT
      POST
    • Get Account Logs
      GET
    • Update Account Name
      PATCH
    • Update Account Password
      PATCH
    • Get Account Preferences
      GET
    • Update Account Preferences
      PATCH
    • Create Password Recovery
      POST
    • Complete Password Recovery
      PUT
    • Delete All Account Sessions
      DELETE
    • Get Account Sessions
      GET
    • Create Account Session
      POST
    • Create Anonymous Session
      POST
    • Create Account Session with OAuth2
      GET
    • Delete Account Session
      DELETE
    • Get Session By ID
      GET
    • Create Email Verification
      POST
    • Complete Email Verification
      PUT
  • avatars
    • Get Browser Icon
      GET
    • Get Credit Card Icon
      GET
    • Get Favicon
      GET
    • Get Country Flag
      GET
    • Get Image from URL
      GET
    • Get User Initials
      GET
    • Get QR Code
      GET
  • database
    • List Documents
      GET
    • Create Document
      POST
    • Delete Document
      DELETE
    • Get Document
      GET
    • Update Document
      PATCH
  • functions
    • List Executions
    • Create Execution
    • Get Execution
  • locale
    • Get User Locale
    • List Continents
    • List Countries
    • List EU Countries
    • List Countries Phone Codes
    • List Currencies
    • List Languages
  • storage
    • List Files
    • Create File
    • Delete File
    • Get File
    • Update File
    • Get File for Download
    • Get File Preview
    • Get File for View
  • teams
    • List Teams
    • Create Team
    • Delete Team
    • Get Team
    • Update Team
    • Get Team Memberships
    • Create Team Membership
    • Delete Team Membership
    • Update Membership Roles
    • Update Team Membership Status
  1. database

List Documents

GET
/database/collections/{collectionId}/documents
database
Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. Learn more about different API modes.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://appwrite.io/v1/database/collections//documents'
Response Response Example
{
    "documents": [
        {
            "$collection": "string",
            "$id": "string",
            "$permissions": {}
        }
    ],
    "sum": 0
}

Request

Path Params
collectionId
string 
required
Collection unique ID. You can create a new collection with validation rules using the Database service server integration.
Query Params
filters
array[string]
optional

Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'.

limit
integer 
optional
Maximum number of documents to return in response. Use this value to manage pagination. By default will return maximum 25 results. Maximum of 100 results allowed per request.
offset
integer 
optional
Offset value. The default value is 0. Use this param to manage pagination.
orderField
string 
optional
Document field that results will be sorted by.
orderType
string 
optional
Order direction. Possible values are DESC for descending order, or ASC for ascending order.
orderCast
string 
optional
Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string.
search
string 
optional
Search query. Enter any free text search. The database will try to find a match against all document attributes and children. Max length: 256 chars.

Responses

🟢200Documents List
application/json
Body
Documents List
documents
array[object (document) {4}] 
required
List of documents.
$collection
string 
required
Collection ID.
$id
string 
required
Document ID.
$permissions
object 
required
Document permissions.
Additional properties
integer  | number  | string  | boolean 
optional
sum
integer <int32>
required
Total sum of items in the list.
Modified at 2023-08-16 07:28:13
Previous
Get QR Code
Next
Create Document
Built with