The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
update new open api endpoint
Joshen Limeee0e8349afd
diff --git a/studio/data/docs/project-json-schema-query.ts b/studio/data/docs/project-json-schema-query.tsindex a70c59c6d96..1155f7c14a6 100644--- a/studio/data/docs/project-json-schema-query.ts+++ b/studio/data/docs/project-json-schema-query.ts@@ -18,7 +18,7 @@ export async function getProjectJsonSchema(throw new Error('projectRef is required')}- const url = `${API_URL}/projects/${projectRef}/open-api`+ const url = `${API_URL}/projects/${projectRef}/api/rest`const response = await get(url, { signal })if (response.error) throw response.errorreturn response as ProjectJsonSchemaResponsediff --git a/studio/lib/pingPostgrest.ts b/studio/lib/pingPostgrest.tsindex 1680fffe296..42919651b3f 100644--- a/studio/lib/pingPostgrest.ts+++ b/studio/lib/pingPostgrest.ts@@ -46,7 +46,7 @@ export default pingPostgrest* @return true if there's no error else false*/async function pingOpenApi(ref: string, timeout?: number) {- const { error } = await headWithTimeout(`${API_URL}/projects/${ref}/open-api`, [], {+ const { error } = await headWithTimeout(`${API_URL}/projects/${ref}/api/rest`, [], {timeout: timeout ?? DEFAULT_TIMEOUT_MILLISECONDS,})return error === undefineddiff --git a/studio/stores/pgmeta/MetaStore.ts b/studio/stores/pgmeta/MetaStore.tsindex 0ef0f14d607..a24c5f365f0 100644--- a/studio/stores/pgmeta/MetaStore.ts+++ b/studio/stores/pgmeta/MetaStore.ts@@ -183,7 +183,7 @@ export default class MetaStore implements IMetaStore {this.openApi = new OpenApiStore(this.rootStore,- `${API_URL}/projects/${this.projectRef}/open-api`+ `${API_URL}/projects/${this.projectRef}/api/rest`)this.tables = new TableStore(this.rootStore, `${this.baseUrl}/tables`, this.headers)this.columns = new ColumnStore(this.rootStore, `${this.baseUrl}/columns`, this.headers)@@ -895,7 +895,7 @@ export default class MetaStore implements IMetaStore {this.headers['x-connection-encrypted'] = connectionString}- this.openApi.setUrl(`${API_URL}/projects/${this.projectRef}/open-api`)+ this.openApi.setUrl(`${API_URL}/projects/${this.projectRef}/api/rest`)this.openApi.setHeaders(this.headers)this.tables.setUrl(`${this.baseUrl}/tables`)