---
title: "Get PostgREST OpenAPI spec"
method: GET
path: "/v1/projects/{ref}/database/openapi"
tags: ["Database"]
---

# Get PostgREST OpenAPI spec

`GET /v1/projects/{ref}/database/openapi`

Returns the PostgREST OpenAPI specification for the project. This is the replacement for querying `/rest/v1/` directly with the anon key.

## Path parameters

- `ref` string, required

## Query parameters

- `schema` string

## Response `200`

- object

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to fetch PostgREST OpenAPI spec

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
