database

Get a site database

Changed on

Returns the database connection string for the specified site.

get/sites/{site_id}/database

Request

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

Query parameters

role'netlifydb_owner' | 'netlifydb_readonly'

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

Response

OK

connection_stringstring

The connection string for the database

Changes