Database not found when attempting to ListDocuments (or any document method) without API key
- 0
- Databases
- REST API
- Cloud
So, I am doing this in postman to eliminate any possible weirdness from my SDK, and still unable to hit any document level endpoint for my database.
I am trying to list documents, for example. I am sending a GET to https://cloud.appwrite.io/v1/databases/6748b44d000b2b0e73ac/collections/6748bb30002a12d4708f/documents
, with the project ID set in the headers. When I also send through the API key, I get the results that I would expect. However, when I don't send the API key (so acting as a guest) I get the following response:
{
"message": "Database not found",
"code": 404,
"type": "database_not_found",
"version": "1.6.1"
}
I have also tried sending an authenticated user as the Session header, and I also get the same response.
Now, the collection has the permissions shown in the attached image, however I have tried with a variety of permissions and have never had it work. I don't think the issue lies there however, as I would expect to see instead an error relating to the collection, not the database.
The database ID is 100% correct, as the exact same URL works correctly when I provide the API key.
Totally lost with this right now, sorry.
Are you using collection level or document level permissions?
I hav tried with document security turned both on and off, and whilst on have provided similar permissions to the only document within the collection also.
Have deleted the database, created a new one and a new collection, and it appears to be working with this.
I have an identical setup as before
Pretty concerning that database can be put into a state where it becomes inaccessible to the client like that. Is this related to the weird issues recently where the API key got removed etc?
We haven't see any similar issues like that which I'm aware of. What caused this to start happening for you? I you'll share your project ID, I can let the team check and see if they notice any specific issues.
Honestly, I'm not sure. Its a project I am using for test purposes to build a dot net SDK, hence trying thigns in postman etc.
Project ID is 6649523d000d7884ae74
A few days ago, my master API key that I had created and been using for a while (which has no expiry) stopped working. When viewing it in console, it just reported back as "false".
I've still got it there, so it can still be seen. Have been using a new API key in the meantime. When viewing the api Key, it looks like this. This was the first time I noticed any sort of weirdness...
On the same day, I also had my console account go through weird issue, I was on a page in console, navigated to antoher page in console and got logged out. Tried to log back in but my password didn't seem to work any longer, so I had to reset it before it would let me back in.
Got it, thanks for sharing the ID. Let me check with the team and see if this is something of concern. We'll also monitor for any other similar issues, but I'm not aware of such for now.
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...