GET
/projects/{project_id}/branches/{branch_id}/compare_schemaCompare database schemaCompares the schema from the specified database with another branch's schema.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe branch ID
base_branch_idstringqueryThe branch ID to compare the schema with
db_namestringqueryrequiredName of the database for which the schema is retrieved
lsnstringqueryThe Log Sequence Number (LSN) for which the schema is retrieved
timestampstring · date-timequeryThe point in time for which the schema is retrieved
base_lsnstringqueryThe Log Sequence Number (LSN) for the base branch schema
base_timestampstring · date-timequeryThe point in time for the base branch schema
Responses
objectBranchSchemaCompareResponse
diffstringUnified diff of the SQL schema changes between the compared branches.
{
"diff": "string"
}objectGeneralError
codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}