I'm querying a appwrite collection via the REST API on appwrite cloud 1.9.5 (no SDK) via a cloudflare worker and keep getting:
{"message":"Invalid query: Attribute not found in schema: ","code":400,"type":"general_query_invalid","version":"1.9.5"}
This was my https request: https://fra.cloud.appwrite.io/v1/databases/<DB_ID>/collections/<COLLECTION_ID>/documents?queries[]={"method":"equal","column":"userId","values":["<USER_ID>"]}.
To my understanding, it is the correct format.
I can confirm that the attribute userId exists in the collection and userId is indexed. DB ID, Collection ID, and Project ID are all correct. JWT auth is working. Fetching ALL documents with no query works fine. With a query, there is a problem.
Why do I get the Attribute not found in schema error? How can I resolve this?
Here was my code for the fetch
const query = JSON.stringify({ method: "equal", column: "userId", values: [userId], });
const userProfileResponse = await fetch(
${env.APPWRITE_ENDPOINT}/databases/${env.DB_ID}/collections/${env.USER_PROFILE_ID}/documents?queries[]=${encodeURIComponent(query)},
{
method: "GET",
headers: {
"X-Appwrite-Project": env.PROJECT_ID,
"X-Appwrite-JWT": jwt,
},
}
);
Recommended threads
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- executeFunction intermittently throws Fo...
Environment: Flutter app using the Appwrite Flutter SDK, calling executeFunction for [describe endpoint, e.g. live-stream-related function]. *Description*: Int...
- Console display all Databases as TablesD...
While looking at an issue with <@1231860789355347971> we saw that the console was displaying ALL databases as `TablesDB` even if the real type in the API is `le...