Azure Database for PostgreSQL REST API
The Azure Database for PostgreSQL REST API is available for you to create, delete, manage, and list servers, databases, logs, firewall rules, and operations.
Azure Database for PostgreSQL provides a managed database service for app development and deployment that allows you to stand up a PostgreSQL database in minutes and scale on the fly - on the cloud you trust most.
The following information is common to all tasks that you might do using these REST APIs:
- Replace
{api-version}
with the latest available API Version such as2020-01-01
. You can find the latest published version here - Replace
{subscriptionId}
with your subscription identifier in the URI. This value is a GUID unique to your subscription, such as 6B29FC40-CA47-1067-B31D-00DD010662DA. Locate the subscription ID using the Azure portal subscriptions blade. - Replace
{resourceGroupName}
with the resource group. For more information, see Using Resource groups to manage your Azure resources. - Replace
{serverName}
with the name of your Azure Database for PostgreSQL server. Use the short name, such asmydemoserver
, not the fully qualified network name, such asmydemoserver.postgres.database.azure.com
. - Set the Content-Type header to application/json.
- Set the Authorization header to a JSON Web Token that you obtain from Azure Active Directory. For more information, see Authenticating Azure Resource Manager requests.
Single Server REST operations
Operation group | Description |
---|---|
Server | Create, Restore, Update, Delete, Get, or List servers. |
Configurations | Update, Get, and List the configuration of a server. |
Databases | Create, Delete, Get, or List databases in the server. |
Firewall Rules | Creates, Delete, Get, or List the firewall rules in a server. |
Log Files | Lists the log files in a given server. |
Operations | Lists the available REST API operations. |
Flexible Server REST operations
Operation group | Description |
---|---|
Server | Create, Restore, Update, Delete, Get, or List servers. |
Configurations | Update, Get, and List the configuration of a server. |
Databases | Create, Delete, Get, or List databases in the server. |
Firewall Rules | Creates, Delete, Get, or List the firewall rules in a server. |
Operations | Lists the available REST API operations. |
See also
- For an overview of the service, see Azure Database for PostgreSQL Overview
- Create an Azure Database for PostgreSQL server using Azure portal
- Create an Azure Database for PostgreSQL server using Azure CLI
- Azure CLI Samples for Azure Database for PostgreSQL
- For information about connecting to the service, see Connection libraries for Azure Database for PostgreSQL.