Skip to content
Back

REST API does not work for queries

  • 0
  • Databases
  • Web
  • REST API
hanahen
6 Aug, 2025, 23:54
TypeScript
curl -X GET "https://cloud.appwrite.io/v1/databases/<db-id>/collections/<c-id>/documents" -H "X-Appwrite-Project: <project-id>"   -H "X-Appwrite-Key: <key>" -H "Content-Type: application/json"   -d '{           
    "queries": [
      {                   
        "method": "equal",
        "attribute": "phoneNumber",
        "value": ["XXXXXXXXXXX"]
      }
    ]
  }'

This is returning ALL of the documents - not the matching query.

TL;DR
Title: REST API not filtering queries correctly Developers are experiencing an issue with their REST API queries, as all documents are being returned instead of the filtered ones as intended. Solution: Ensure that the query parameters are correctly formatted. Check the attributes and values for any discrepancies.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more