Skip to content
Back

Invalid query: Attribute not found in schema even though query, and attribute are correct/exist.

  • 0
  • 2
  • Self Hosted
  • Databases
  • REST API
Aku
2 Nov, 2025, 20:29

Hiya. I'm trying to use the REST API with documents and doing a simple select with query:

https://<mydomain>/v1/databases/<database>/collections/<collection>/documents?queries[]=%7B%22method%22%3A%22equal%22%2C%22column%22%3A%22uuid%22%2C%22values%22%3A%5B%22abcdefg%22%5D%7D

({"method":"equal","column":"uuid","values":["abcdefg"]})

and getting

TypeScript
    "message": "Invalid query: Attribute not found in schema: ",
    "code": 400,
    "type": "general_query_invalid",
    "version": "1.6.0",
    "file": "/usr/src/code/app/controllers/api/databases.php",
    "line": 3099,
    "trace": 

even though the attribute definitely does exist. Could this be an installation error on my part, perhaps? Thanks for the help

TL;DR
Query is throwing an error because of incorrect attribute name. It should be `"attribute":"uuid"` instead of `"column":"uuid"`. The terminology confusion is due to updates in alignment with SQL databases, even though queries have not been updated yet. The issue has been resolved.
Aku
2 Nov, 2025, 20:33

Or maybe I'm misunderstanding how to use the query argument. First time using it.

2 Nov, 2025, 22:02

I can help with that this error usually happens when the field name in your query doesn’t exactly match the attribute name in your collection schema (case-sensitive) or if the document schema hasn’t been updated after adding the field.

Did you manually create the uuid field in the dashboard or through the API?

3 Nov, 2025, 06:22

Your query should have "attribute":"uuid" instead of "column":"uuid"

3 Nov, 2025, 07:36

I created it through the dashboard, so not sure if that would be an issue...

3 Nov, 2025, 07:36

Ah! That's probably it. Will try later. I was a bit confused with the naming scheme in the query document. Why does it talk about table, row and column?

3 Nov, 2025, 07:36

Is it to generalize the doc reference?

3 Nov, 2025, 07:40

We recently changed terminology to be more in line with the technology being used (SQL databases), but queries have not been updated yet. Often people are using the SDKs, so won't see the encoded form

1
3 Nov, 2025, 13:50

Solved!

3 Nov, 2025, 14:43

Can you send me a message

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