Back

Using `queries` in REST request results in `Invalid query: Syntax error`

  • 0
  • Self Hosted
  • REST API
David Koontz
5 Apr, 2024, 20:45

Self hosted on version 1.5.4 Using Postman I am attempting to query a very simple collection that only has 1 field name, when I do not include the queries param I see the 4 entries in the collection, when I add a simple queries param such as queries[]=limit(1) or queries[]=select("name"). This collection does not have any relations.

URL that works: http://localhost/v1/databases/660f6fad002495466911/collections/organizations/documents

URL that fails: http://localhost/v1/databases/660f6fad002495466911/collections/organizations/documents?queries[]=limit(1)

I have seen examples from other people who have posted their REST requests and it looks like this should work so I feel like I'm missing something very basic.

TL;DR
Developers are experiencing issues using the `queries` param in their REST requests, resulting in an "Invalid query: Syntax error" when trying to filter a collection. The problem seems to arise even with simple queries like `queries[]=limit(1)` or `queries[]=select("name")`. Some developers have had success querying collections without the `queries` param.
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