PostgreSQL Backup Policies

The /policies/postgresFlexible resource collection represents PostgreSQL backup policies configured in Veeam Backup for Microsoft Azure.

Get Collection of PostgreSQL Backup Policies

The HTTP GET request to the /policies/postgresFlexible endpoint retrieves a list of PostgreSQL backup policies configured in Veeam Backup for Microsoft Azure.

SecurityBearer
Request
query Parameters
PolicyName
string or null

Returns a backup policy with the specified name.

ServerId
string or null

Returns only backup policies that protect a PostgreSQL server with the specified ID.

LastJobStatus
Array of strings or null (JobStatus)

Returns only backup policies with the specified status of the latest session.

Enum: "Canceled" "Canceling" "Error" "NeverExecuted" "Running" "RunningWithError" "RunningWithWarning" "Success" "Warning" "Pending" "Unknown"
PolicyStatus
Array of strings or null (PolicyStatus)

Returns only backup policies with the specified status.

Enum: "Enabled" "Disabled" "Unknown"
RepositoryId
string or null

Returns only backup policies that store backup files in a repository with the specified ID.

Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

get/api/v10/policies/postgresFlexible
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Create PostgreSQL Backup Policy

The HTTP POST request to the /policies/postgresFlexible endpoint creates a new PostgreSQL backup policy.

SecurityBearer
Request
Request Body schema: application/json
required
backupType
required
string or null (BackupTypeNullable)

Defines whether you want to include to the backup scope all resources residing in the specified Azure regions and to which the specified service account has access.

Enum: "AllSubscriptions" "SelectedItems" "Unknown"
isEnabled
required
boolean or null

Defines whether to enable the policy.

name
required
string [ 1 .. 255 ] characters

Specifies a name for the backup policy.

required
Array of objects (PolicyRegionFromClient) non-empty

Azure regions where the resources that will be backed up reside.

tenantId
required
string

Specifies a Microsoft Azure ID assigned to a tenant with which the service account used to protect Azure resources is associated.

serviceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account whose permissions will be used to perform PostgreSQL backup.

object or null (PostgresFlexibleServerPolicyBackupItemsFromClient)

Specifies information on Azure resources to protect by the backup policy.

object or null (PostgresFlexibleServerPolicyExcludedItemsFromClient)

Specifies Azure resources to exclude from the backup scope.

description
string or null

Specifies a description for the backup policy.

object or null (RetrySettings)

Specifies the retry settings for the backup policy.

object or null (PolicyNotificationSettings)

Specifies the notification settings for the backup policy.

createPrivateEndpointToWorkloadAutomatically
boolean or null

Defines whether the backup policy should create private endpoint to workload automatically.

object or null (DailySqlSchedule)

Specifies daily schedule settings for the backup policy.

object or null (WeeklySqlSchedule)

Specifies weekly schedule settings for the backup policy.

object or null (MonthlySqlSchedule)

Specifies monthly schedule settings for the backup policy.

object or null (YearlySchedule)

Specifies the yearly schedule settings for the backup policy.

object or null (HealthCheckSchedule)

[Applies if backup creation is enabled for the backup policy] Specifies the health check schedule settings.

defaultBackupAccountId
string <int64>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a default account that will be used to access all protected PostgreSQL flexible servers.

object or null (PostgresFlexibleServerProcessingCredentials)

Specifies a list of credentials that will be used to connect to the specified PostgreSQL flexible servers.

enableEntraIdAuthenticationForServerIds
Array of strings or null

Specifies Microsoft Azure IDs of PostgreSQL servers against which Veeam Backup for Microsoft Azure will authenticate using the Entra ID application instead of database accounts.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

415

Client Error

post/api/v10/policies/postgresFlexible
Request samples
application/json
{
  • "tenantId": "string",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "regions": [
    ],
  • "selectedItems": {
    },
  • "excludedItems": {
    },
  • "name": "string",
  • "description": "string",
  • "retrySettings": {
    },
  • "policyNotificationSettings": {
    },
  • "isEnabled": true,
  • "createPrivateEndpointToWorkloadAutomatically": true,
  • "backupType": "AllSubscriptions",
  • "dailySchedule": {
    },
  • "weeklySchedule": {
    },
  • "monthlySchedule": {
    },
  • "yearlySchedule": {
    },
  • "healthCheckSchedule": {
    },
  • "defaultBackupAccountId": "string",
  • "credentialsList": {
    },
  • "enableEntraIdAuthenticationForServerIds": [
    ]
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "priority": 0,
  • "excludedItemsCount": 0,
  • "tenantId": "string",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "backupStatus": "Canceled",
  • "archiveStatus": "Canceled",
  • "healthCheckStatus": "Canceled",
  • "nextExecutionTime": "2019-08-24T14:15:22Z",
  • "isArchiveBackupConfigured": true,
  • "createPrivateEndpointToWorkloadAutomatically": true,
  • "_links": {},
  • "name": "string",
  • "description": "string",
  • "retrySettings": {
    },
  • "policyNotificationSettings": {
    },
  • "isEnabled": true,
  • "backupType": "AllSubscriptions",
  • "dailySchedule": {
    },
  • "weeklySchedule": {
    },
  • "monthlySchedule": {
    },
  • "yearlySchedule": {
    },
  • "healthCheckSchedule": {
    },
  • "defaultBackupAccountId": "string",
  • "credentialsList": {
    },
  • "enableEntraIdAuthenticationForServerIds": [
    ]
}

Get Backup Policy Data

The HTTP GET request to the /policies/postgresFlexible/{policyId} endpoint retrieves information on a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v10/policies/postgresFlexible/{policyId}
Request samples
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "priority": 0,
  • "excludedItemsCount": 0,
  • "tenantId": "string",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "backupStatus": "Canceled",
  • "archiveStatus": "Canceled",
  • "healthCheckStatus": "Canceled",
  • "nextExecutionTime": "2019-08-24T14:15:22Z",
  • "isArchiveBackupConfigured": true,
  • "createPrivateEndpointToWorkloadAutomatically": true,
  • "_links": {},
  • "name": "string",
  • "description": "string",
  • "retrySettings": {
    },
  • "policyNotificationSettings": {
    },
  • "isEnabled": true,
  • "backupType": "AllSubscriptions",
  • "dailySchedule": {
    },
  • "weeklySchedule": {
    },
  • "monthlySchedule": {
    },
  • "yearlySchedule": {
    },
  • "healthCheckSchedule": {
    },
  • "defaultBackupAccountId": "string",
  • "credentialsList": {
    },
  • "enableEntraIdAuthenticationForServerIds": [
    ]
}

Modify Backup Policy

The HTTP PUT request to the /policies/postgresFlexible/{policyId} endpoint updates settings of a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Request Body schema: application/json
required
backupType
required
string or null (BackupTypeNullable)

Defines whether you want to include to the backup scope all resources residing in the specified Azure regions and to which the specified service account has access.

Enum: "AllSubscriptions" "SelectedItems" "Unknown"
isEnabled
required
boolean or null

Defines whether to enable the policy.

name
required
string [ 1 .. 255 ] characters

Specifies a name for the backup policy.

required
Array of objects (PolicyRegionFromClient) non-empty

Specifies Azure regions where the backed up resources will reside.

tenantId
string or null

Specifies a Microsoft Azure ID assigned to a tenant to which the protected Azure resources belong.

serviceAccountId
string or null <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to the service account whose permissions will be used to create backups of PostgreSQL servers.

object or null (PostgresFlexibleServerPolicyBackupItemsFromClient)

Specifies information on Azure resources to protect by the backup policy.

object or null (PostgresFlexibleServerPolicyExcludedItemsFromClient)

Specifies Azure resources to exclude from the backup scope.

description
string or null

Specifies a description for the backup policy.

object or null (RetrySettings)

Specifies the retry settings for the backup policy.

object or null (PolicyNotificationSettings)

Specifies the notification settings for the backup policy.

createPrivateEndpointToWorkloadAutomatically
boolean or null

Defines whether the backup policy should create private endpoint to workload automatically.

object or null (DailySqlSchedule)

Specifies daily schedule settings for the backup policy.

object or null (WeeklySqlSchedule)

Specifies weekly schedule settings for the backup policy.

object or null (MonthlySqlSchedule)

Specifies monthly schedule settings for the backup policy.

object or null (YearlySchedule)

Specifies the yearly schedule settings for the backup policy.

object or null (HealthCheckSchedule)

[Applies if backup creation is enabled for the backup policy] Specifies the health check schedule settings.

defaultBackupAccountId
string <int64>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a default account that will be used to access all protected PostgreSQL flexible servers.

object or null (PostgresFlexibleServerProcessingCredentials)

Specifies a list of credentials that will be used to connect to the specified PostgreSQL flexible servers.

enableEntraIdAuthenticationForServerIds
Array of strings or null

Specifies Microsoft Azure IDs of PostgreSQL servers against which Veeam Backup for Microsoft Azure will authenticate using the Entra ID application instead of database accounts.

Responses
200

OK

204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

415

Client Error

put/api/v10/policies/postgresFlexible/{policyId}
Request samples
application/json
{
  • "tenantId": "string",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "regions": [
    ],
  • "selectedItems": {
    },
  • "excludedItems": {
    },
  • "name": "string",
  • "description": "string",
  • "retrySettings": {
    },
  • "policyNotificationSettings": {
    },
  • "isEnabled": true,
  • "createPrivateEndpointToWorkloadAutomatically": true,
  • "backupType": "AllSubscriptions",
  • "dailySchedule": {
    },
  • "weeklySchedule": {
    },
  • "monthlySchedule": {
    },
  • "yearlySchedule": {
    },
  • "healthCheckSchedule": {
    },
  • "defaultBackupAccountId": "string",
  • "credentialsList": {
    },
  • "enableEntraIdAuthenticationForServerIds": [
    ]
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "priority": 0,
  • "excludedItemsCount": 0,
  • "tenantId": "string",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "backupStatus": "Canceled",
  • "archiveStatus": "Canceled",
  • "healthCheckStatus": "Canceled",
  • "nextExecutionTime": "2019-08-24T14:15:22Z",
  • "isArchiveBackupConfigured": true,
  • "createPrivateEndpointToWorkloadAutomatically": true,
  • "_links": {},
  • "name": "string",
  • "description": "string",
  • "retrySettings": {
    },
  • "policyNotificationSettings": {
    },
  • "isEnabled": true,
  • "backupType": "AllSubscriptions",
  • "dailySchedule": {
    },
  • "weeklySchedule": {
    },
  • "monthlySchedule": {
    },
  • "yearlySchedule": {
    },
  • "healthCheckSchedule": {
    },
  • "defaultBackupAccountId": "string",
  • "credentialsList": {
    },
  • "enableEntraIdAuthenticationForServerIds": [
    ]
}

Remove Backup Policy

The HTTP DELETE request to the /policies/postgresFlexible/{policyId} endpoint deletes a specific PostgreSQL backup policy from the Veeam Backup for Microsoft Azure configuration database.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

delete/api/v10/policies/postgresFlexible/{policyId}
Request samples
Response samples
application/problem+json
{
  • "detail": "string",
  • "errors": {
    },
  • "status": 0,
  • "title": "string",
  • "traceId": "string",
  • "type": "string"
}

Get Resources Selected for Backup Policy

The HTTP GET request to the /policies/postgresFlexible/{policyId}/selectedItems endpoint retrieves information on resources protected by a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v10/policies/postgresFlexible/{policyId}/selectedItems
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Get Azure Regions Specified in Policy Settings

The HTTP GET request to the /policies/postgresFlexible/{policyId}/regions endpoint retrieves a list of Azure regions protected by a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v10/policies/postgresFlexible/{policyId}/regions
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Get Resources Excluded from Backup Policy

The HTTP GET request to the /policies/postgresFlexible/{policyId}/excludedItems endpoint retrieves a list of PostgreSQL servers excluded from a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

NameSearchPattern
string or null

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v10/policies/postgresFlexible/{policyId}/excludedItems
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Set Backup Policy Priority

The HTTP POST request to the /policies/postgresFlexible/orderPriorities endpoint sets the priority order for PostgreSQL backup policies.

SecurityBearer
Request
Request Body schema: application/json
Array
string <uuid>

Specifies system IDs assigned in the Veeam Backup for Microsoft Azure REST API to backup policies in the specified order.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

415

Client Error

post/api/v10/policies/postgresFlexible/orderPriorities
Request samples
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
Response samples
application/problem+json
{
  • "detail": "string",
  • "errors": {
    },
  • "status": 0,
  • "title": "string",
  • "traceId": "string",
  • "type": "string"
}

Enable Backup Policy

The HTTP POST request to the /policies/postgresFlexible/{policyId}/enable endpoint enables a disabled PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

post/api/v10/policies/postgresFlexible/{policyId}/enable
Request samples
Response samples
application/problem+json
{
  • "detail": "string",
  • "errors": {
    },
  • "status": 0,
  • "title": "string",
  • "traceId": "string",
  • "type": "string"
}

Disable Backup Policy

The HTTP POST request to the /policies/postgresFlexible/{policyId}/disable endpoint disables an enabled PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

post/api/v10/policies/postgresFlexible/{policyId}/disable
Request samples
Response samples
application/problem+json
{
  • "detail": "string",
  • "errors": {
    },
  • "status": 0,
  • "title": "string",
  • "traceId": "string",
  • "type": "string"
}

Start Backup Policy

The HTTP POST request to the /policies/postgresFlexible/{policyId}/start endpoint launches a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

post/api/v10/policies/postgresFlexible/{policyId}/start
Request samples
Response samples
application/json
[
  • {
    }
]

Stop Backup Policy

The HTTP POST request to the /policies/postgresFlexible/{policyId}/stop endpoint stops execution of a PostgreSQL backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

post/api/v10/policies/postgresFlexible/{policyId}/stop
Request samples
Response samples
application/problem+json
{
  • "detail": "string",
  • "errors": {
    },
  • "status": 0,
  • "title": "string",
  • "traceId": "string",
  • "type": "string"
}

Export Backup Policies

The HTTP POST request to the /policies/postgresFlexible/export endpoint exports a list of PostgreSQL backup policies created in Veeam Backup for Microsoft Azure to a .CSV or an .XML file.

SecurityBearer
Request
header Parameters
Accept
string or null

Specifies a media type of representation of the exported data. The default value is text/csv media type.

Request Body schema: application/json
policyIds
Array of strings or null <uuid>

Returns only information on the policies with the specified IDs.

policyName
string or null

Returns a backup policy with the specified name.

lastJobStatus
Array of strings or null (JobStatus)

Returns only backup policies with the specified status of the latest session.

Enum: "Canceled" "Canceling" "Error" "NeverExecuted" "Running" "RunningWithError" "RunningWithWarning" "Success" "Warning" "Pending" "Unknown"
policyStatus
Array of strings or null (PolicyStatus)

Returns only backup policies with the specified status.

Enum: "Enabled" "Disabled" "Unknown"
Responses
200

OK

401

Unauthorized

403

Forbidden

post/api/v10/policies/postgresFlexible/export
Request samples
application/json
{
  • "policyIds": [
    ],
  • "policyName": "string",
  • "lastJobStatus": [
    ],
  • "policyStatus": [
    ]
}
Response samples
application/problem+json
{
  • "extensions": { },
  • "status": 0,
  • "title": "string",
  • "detail": "string",
  • "type": "string"
}

Get Resources Protected by Backup Policy

The HTTP GET request to the /policies/postgresFlexible/{policyId}/protectedItems endpoint retrieves a list of PostgreSQL servers protected by a backup policy with the specified ID.

SecurityBearer
Request
path Parameters
policyId
required
string <uuid>

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

Limit
integer <int32> >= -1

Specifies the system ID assigned to a backup policy in the Veeam Backup for Microsoft Azure REST API.

Responses
200

OK

401

Unauthorized

403

Forbidden

get/api/v10/policies/postgresFlexible/{policyId}/protectedItems
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}