v1
latestOpenAPI 3.0.3Proprietary2026-07-26162247330.6 KBBranch
Retrieve database schema
Retrieves the schema from the specified database. The lsn and timestamp values cannot be specified at the same time. If both are omitted, the database schema is retrieved from database's head.
get/projects/{project_id}/branches/{branch_id}/schema
Path parameters
project_idstring required
The Neon project ID
branch_idstring required
The branch ID
Query parameters
db_namestring required
Name of the database for which the schema is retrieved
lsnstring
The Log Sequence Number (LSN) for which the schema is retrieved
timestampstring date-time
Example:2022-11-30T20:09:48Z
The point in time for which the schema is retrieved
formatstring
The format of the schema to retrieve. Possible values:
- sql (default)
- json
Response
Schema definition