Branch
Retrieve database schema
Retrieves the database schema. Specify lsn or timestamp (not both) to read at a point in time; omit both to read from the database's head.
get/projects/{project_id}/branches/{branch_id}/schema
Request
- Base URL: https://console.neon.tech/api/v2
- URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/schema
- Auth: one of:
- HTTP bearer
- API key in cookie zenith
- API key in cookie keycloak_token
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
Changes
No recorded changes to this operation across all 15 revisions of this API.