Back

[SOLVED] Rest API: database not found

  • 0
  • Databases
D5
7 Aug, 2023, 05:22

I'm doing a request to get all documents in a collection like this:

https://mydomain.com/v1/databases/6495862f48d7d229caec/collections/640b33c1e55f24e05d10/documents

And I get database not found error, permissions seems to be OK, am I doing something wrong?

TL;DR
The user encountered a "Rest API: database not found" error while trying to retrieve documents from a collection using a request. After some troubleshooting, they found that adding the "X-Appwrite-Project" header to the request solved the issue. They also discovered that the permissions on their collection were set incorrectly, causing the error. The user tested the REST API on Postman and confirmed that it worked. The user also mentioned that they were using version 1.3.8 of Appwrite.
D5
7 Aug, 2023, 05:22

Rest API: database not found

safwan
7 Aug, 2023, 07:29

What version of Appwrite is this?

safwan
7 Aug, 2023, 07:33

I seem to get the same error on 1.3.8. Will try to see what the issue could be

D5
7 Aug, 2023, 13:06

Latest, 1.3.8

safwan
7 Aug, 2023, 14:11

yep just tested and I get a 404 as well

safwan
7 Aug, 2023, 14:15

okay so I realized the permissions on my collection were set wrong

safwan
7 Aug, 2023, 14:15

I tested with REST API on Postman, and it worked

safwan
7 Aug, 2023, 14:16

I had to add the X-Appwrite-Project header to the request though

safwan
7 Aug, 2023, 14:16

Without the header it gave me a 404 database not found

D5
7 Aug, 2023, 14:44

Uh, then that's the problem. I'm going to try with the header

safwan
7 Aug, 2023, 15:22

let me know

D5
7 Aug, 2023, 22:08

[SOLVED] Rest API: database not found

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