I am trying to query a single row from Astra DB using the HTTP Request node in n8n.
The table is called host_checked
, and I want to select a record by its primary key field: host
.
I can successfully fetch all rows using this GET request:
However, when I try to get only one row by key (for example, perkasamedical.com
), I encounter errors.
Depending on the method:
- GET request to
/rows/perkasamedical.com
→Bad request - Table 'tables' not found (in keyspace 'contacts_keyspace')
- POST request to
/rows/query
with JSON body:
{
“where”: {
“host”: {
“eq”: “perkasamedical.com”
}
}
}
→
405 Method Not Allowed
or Bad request: 'where' must be provided.
Error message:
{
“error”: “Method not allowed - please check you are using the right HTTP method”,
“statusCode”: 405
}
Or sometimes:
{
“error”: “Bad request - please check your parameters”,
“message”: “Request invalid: ‘where’ must be provided.”
}
Information on your n8n setup
- n8n version: 1.41.1
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- **Running n8n via Virtual Machine (Google Cloud) via npm
- Operating system: Debian 12
Question:
How can I correctly query one row from Astra DB by primary key (host
) using n8n HTTP Request node?
Thank you very much in advance!