Missing Supabase API Documentation

Where are the API docs for https://api.supabase.com/api/v1#/projects%20config ? The terraform provider uses these endpoints, and because the provider doesn't explicitly list what properties are valid for settings and requires JSON, we need a documentation reference!
14 Replies
andrewonaboat
andrewonaboatOP2mo ago
smh. @inder show me where projects config endpoint is on that page please
inder
inder2mo ago
Did see the url that's why linked you to management api. https://supabase.com/docs/reference/api/v1-create-a-project
No description
andrewonaboat
andrewonaboatOP2mo ago
that's literally not the url
andrewonaboat
andrewonaboatOP2mo ago
you don't seem to be understanding the difference between the management API endpoints and what the terraform provider has in its documentation. here's a link https://github.com/supabase/terraform-provider-supabase/blob/a5e4faa1a493b07a004246ba16aaacb59b3cc68e/internal/provider/settings_resource.go#L87
GitHub
terraform-provider-supabase/internal/provider/settings_resource.go ...
Contribute to supabase/terraform-provider-supabase development by creating an account on GitHub.
andrewonaboat
andrewonaboatOP2mo ago
I called that out in my OP, perhaps you missed that part
inder
inder2mo ago
In the pulumi documentation, it mentions that each service needs serializable json https://www.pulumi.com/registry/packages/supabase/api-docs/settings/#inputs. And as pulumi builds on terraform, I believe this is the json which can be passed
https://supabase.com/docs/reference/api/v1-update-auth-service-config https://supabase.com/docs/reference/api/v1-update-postgres-config https://supabase.com/docs/reference/api/v1-update-storage-config https://supabase.com/docs/reference/api/v1-upgrade-postgres-version don't know specifically about terraform so won't be of any help there
garyaustin
garyaustin2mo ago
I agree the SB Terraform docs such as they are seem to be linking to the API management pages even though the URL shown in that config page is different than the exact ones for API management.
inder
inder2mo ago
The docs are fine. I believe the link added in the Markdown Description field should be changed because in the test file the actual url used is the same as on management api page. https://github.com/supabase/terraform-provider-supabase/blob/a5e4faa1a493b07a004246ba16aaacb59b3cc68e/internal/provider/settings_resource_test.go#L16. these links are used for generating terraform docs so links are broken there. It should either be linked to the management api update-config link I mentioned in the last message or this one https://api.supabase.com/api/v1/#tag/auth/patch/v1/projects/{ref}/config/auth For future readers, I tested deploying supabase with pulumi and indeed management api is the correct source. The url which OP talks about is maybe old, there is no clarity on that. But it is invalid. So you don't have to shake your heads and you should look at the management api docs or in the openapi docs search for update config and that should give you the valid endpoints with valid json fields Example code with pulumi
const project = new supabase.Project(
"test-supa-project",
{
organizationId: "YOUR-ORG-ID",
region: "us-east-1",
databasePassword: "password",
// instanceSize: "nano", // free plans can't provide instanceSize
name: "test-project"
}
);

new supabase.Settings(
"supa-project-settings",
{
projectRef: project.id,
auth: JSON.stringify({
site_url: "http://localhost:5000",
jwt_exp: 3600,
disable_signup: true,
security_captcha_enabled: true,
security_captcha_provider: "turnstile",
security_captcha_secret: "lorem"
})
}
);
const project = new supabase.Project(
"test-supa-project",
{
organizationId: "YOUR-ORG-ID",
region: "us-east-1",
databasePassword: "password",
// instanceSize: "nano", // free plans can't provide instanceSize
name: "test-project"
}
);

new supabase.Settings(
"supa-project-settings",
{
projectRef: project.id,
auth: JSON.stringify({
site_url: "http://localhost:5000",
jwt_exp: 3600,
disable_signup: true,
security_captcha_enabled: true,
security_captcha_provider: "turnstile",
security_captcha_secret: "lorem"
})
}
);
andrewonaboat
andrewonaboatOP2mo ago
I'm writing a new terraform provider for supabase, since that's the source of confusion. Not sure why that was released in that condition, but here we are.
inder
inder2mo ago
Seems to me the only issue is with the docs link. Also another user pointed out the broken docs link here https://github.com/supabase/terraform-provider-supabase/issues/227 But I don't use terraform so could be wrong. Pulumi worked flawlessly
andrewonaboat
andrewonaboatOP2mo ago
the provider is fundamentally flawed because it provides no type checking - only accepts JSON strings. Pulumi and CDKTF operate along the same lines. additionally they dont provide access to manage functions, buckets, webhooks, etc.
inder
inder2mo ago
Yeah doesn't provide access for functions, surprising as there are already endpoints for CRUD operations for functions. If you're working on a custom provider, maybe build on top of this one and open a PR
andrewonaboat
andrewonaboatOP2mo ago
my dude I've already released it. they haven't looked at that repo in 7 months, a PR that is fundamentally a new project isn't gonna get eyeballs lol

Did you find this page helpful?