v1

latestSwagger 2.02026-07-13180103150.2 KB
database

Resets a non-production database branch by re-forking it from a source branch (defaults to the production branch). If the target branch is already in sync with the source, returns the existing connection string without performing a reset, unless force=true is passed. The production branch cannot be reset.

post/sites/{site_id}/database/branch/{branch_id}/reset

Query parameters

forceboolean

If true, resets the branch even when it is already in sync with the source.

role'netlifydb_owner' | 'netlifydb_readonly'

The database role to use for the returned connection string. Defaults to netlifydb_owner if not specified.

Request body

source_branch_idstring

The ID of the branch to re-fork the target branch from. Defaults to "production" if not specified.

Response

OK

resetboolean

Whether the branch was actually re-forked. False when the target was already in sync with the source and force=true was not set.

connection_stringstring

The connection string for the reset (or unchanged) branch

metadataobject

Metadata associated with the branch