---
title: "export the schema of a PostgreSQL database"
method: POST
path: "/w/{workspace}/workspaces/export_pg_schema"
tags: ["workspace"]
---

# export the schema of a PostgreSQL database

`POST /w/{workspace}/workspaces/export_pg_schema`

## Path parameters

- `workspace` string, required

## Request body

- object
  - `source` string, required — Source database: 'datatable://name' or '$res:path'

## Response `200`

schema dump

---

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