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
- Quota not resetting
hi, im using appwrite's free tier plani hit my read limts last month and the billing cycle said it would reset on june 4th but that is today, the billing cycle ...
- Request for temporary 3 to 4 hours datab...
Hi Appwrite Team, I hope you are doing well.We are an early-stage startup currently running on Appwrite Cloud. We have unfortunately exhausted our database rea...
- Realtime Error Invalid query: Syntax err...
I was test driving Self-Hosted Appwrite for my use with Swift IOS apps as a backend while back and after successful trials, I started to move to incorporate int...