Back

HTTP REST API Changes?

  • 0
  • Databases
  • REST API
  • Cloud
havoc
17 Jul, 2024, 08:31

Hi everyone!

Has there been a change in the syntax to the HTTP REST API? I used Postman with the following endpoint just last March - April, and everything was working as expected (I would get the first 10 documents)

TypeScript
https://cloud.appwrite.io/v1/databases/{{databaseId}}/collections/{{collectionId}}/documents?queries[]=limit(10)

However, running this today, I get this error instead:

TypeScript
{"message":"Invalid query: Syntax error","code":400,"type":"general_query_invalid","version":"1.5.8"}

and removing the queries parameter gives me the first 25 documents, while reporting the correct total count of documents (as expected when limit is not defined).

And if there were some changes, could you please send me a link to the updated documentation? All documentation links point to the same ones I read last March.

Thank you!

TL;DR
There might have been a change in syntax for the HTTP REST API. The developer was using an endpoint with a 'queries' parameter to limit results to 10 documents, but now receives a syntax error and gets 25 documents by default. The documentation hasn't been updated.
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