Replies: 1 comment 1 reply
|
Did you use https://supabase.com/dashboard/account/tokens to generate the access token and did you set a preset of read-only |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hallo: I am using a hosted Supabase project on the Free plan and need to execute a read-only aggregate SQL diagnostic through the Management API.
The current Management API documentation/OpenAPI specification lists these endpoints:
POST /v1/projects/{ref}/database/query/read-only
and:
POST /v1/projects/{ref}/database/query
with "read_only": true in the request body.
I authenticated using a Supabase personal access token and tested both endpoints. Both returned HTTP 404 with an empty response body.
Attempt 1:
Endpoint:
POST /v1/projects/{ref}/database/query/read-only
Result:
Attempt 2:
Endpoint:
POST /v1/projects/{ref}/database/query
Body included:
{
"query": "",
"read_only": true
}
Result:
The response URI matched the requested URI, so no redirect occurred. TLS and connectivity completed successfully.
The SQL was a SELECT-only aggregate diagnostic. It contained no INSERT, UPDATE, DELETE, DDL, or raw-record output.
Could someone confirm:
I have omitted the access token and full project reference for security. I can provide further non-secret request details if needed.
Cheers
All reactions