database

Get a database migration

Changed on

Returns the contents of a named migration for the specified branch.

get/sites/{site_id}/database/migrations/{name}

Request

  • Base URL
    https://api.netlify.com/api/v1
  • URL
    https://api.netlify.com/api/v1/sites/{site_id}/database/migrations/{name}
  • Auth
    OAuth 2
    Implicit: https://app.netlify.com/authorize

Query parameters

branchstring

The branch ID to look up the migration on. Defaults to the currently published deploy's branch.

Response

OK

versioninteger

The migration version number

namestring

The migration name

pathstring

The path to the migration file in the deploy bundle

contentstring

The raw contents of the migration file

Changes