canonical: https://jentic.com/apis/azure.com/azure-sql-database-backup

# Microsoft Azure Azure SQL Database Backup

The Azure SQL Database Backup API provides read access to recoverable databases and restorable dropped databases under Azure SQL Server resources. Agents can list geo-redundant backups available for recovery, retrieve backup metadata for specific databases, and inspect dropped databases that remain restorable within their retention window. The API exposes 4 GET operations under the Microsoft.Sql resource provider and is intended for disaster-recovery discovery and audit workflows on Azure SQL Server.

## For AI agents

Inspect recoverable and restorable-dropped Azure SQL databases so an agent can discover which backups exist before triggering a restore.

## Scope

Does not perform restores, manage long-term retention policies, or configure geo-replication - use for read-only backup discovery on Azure SQL Server only.

## Capabilities

- List recoverable databases that have geo-redundant backups available on a given Azure SQL Server
- Retrieve a specific recoverable database resource representing a database's geo backup
- List restorable dropped databases on a server within their retention window
- Get metadata for a single restorable dropped database including deletion date and earliest restore date
- Inspect service tier and edition information attached to backup-eligible databases

## Use cases

### Disaster Recovery Inventory

Before initiating a restore, an operations team needs to know which Azure SQL databases on a server have recoverable geo backups and which dropped databases are still within their restore window. This API returns recoverable database listings and per-database backup metadata under the Microsoft.Sql/servers resource path, scoped to a subscription and resource group. It is read-only and complements the broader Azure SQL Database management API used to perform the actual restore.

Example prompt: List all restorable dropped databases for resource group sales-prod on server sales-sql-east, and return any whose earliestRestoreDate is within the last 7 days

### Compliance Audit of Backup Coverage

Compliance reviewers need evidence that production databases have valid geo-redundant backups. The recoverableDatabases endpoints surface lastAvailableBackupDate, edition, and serviceLevelObjective per database, which auditors can compare against retention SLOs. Read-only, no mutation risk during an audit pass.

Example prompt: For every database under server finance-sql-prod, fetch the recoverableDatabase resource and flag any whose lastAvailableBackupDate is older than 24 hours

### Pre-Restore Validation by AI Agent

An AI agent handling a restore request first verifies the target database is actually restorable before invoking the disaster-recovery configuration or restore operation in the broader SQL management API. Through Jentic, the agent searches for backup-inspection operations, loads the schema, and calls RecoverableDatabases_Get or RestorableDroppedDatabases_Get to confirm eligibility, returning the earliestRestoreDate to the user.

Example prompt: Verify that database orders-prod on server orders-sql-east is recoverable and return its lastAvailableBackupDate and serviceLevelObjective

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases | List recoverable databases on a server |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} | Get a specific recoverable database |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases | List restorable dropped databases on a server |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId} | Get a specific restorable dropped database |

## Key resources

- **RecoverableDatabases** — Databases with geo-redundant backups available for recovery on a given server
- **RestorableDroppedDatabases** — Deleted databases that remain restorable within their retention window

## Why Jentic

- **Setup:** Wiring the Azure SQL Database Backup API by hand means registering an Azure AD app, minting bearer tokens for https://management.azure.com/, and writing your own paging and Retry-After handling for the read-only Microsoft.Sql backup endpoints. Through Jentic you install once, import Azure SQL Database Backup from the API Directory, store the Azure AD credential once, and your agent calls it.
- **Permission scoping:** The server and database ids travel in the URL path (/servers/{serverName}/recoverableDatabases/{databaseName}), so a rule can pin your agent to one server: it can list recoverable and restorable-dropped databases there and nothing else. Every operation on this surface is a read-only GET, so limit the agent to the specific lookups it needs, such as listing recoverable databases.
- **Credential handling:** Your Azure AD credential is stored once, encrypted, by your own Jentic One instance and exchanged for a short-lived bearer token at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list azure sql recoverable databases' or 'check whether a dropped database is still restorable', and Jentic returns the matching Microsoft.Sql operation with its input schema so the agent calls the right endpoint without browsing the ARM reference.

## Related APIs

- **Azure SQL Database** — Full Azure SQL Database management API used to perform restores after backup discovery
- **Azure SQL Database Backup Long Term Retention Policy** — Manages long-term retention policies that govern which backups remain available
- **Azure SQL Database disaster recovery configurations** — Manage geo-replication and failover groups on Azure SQL Server
- **SQL Management Client** — Newer consolidated Azure SQL management API covering backups across recent API versions

## FAQ

### What authentication does the Azure SQL Database Backup API use?

It uses Azure Active Directory OAuth 2.0 (the azure_auth scheme with the implicit flow and the user_impersonation scope at https://login.microsoftonline.com/common/oauth2/authorize). Through Jentic, the OAuth token is held in the vault and never exposed to the agent - the agent receives a scoped execution token instead.

### Can I trigger a restore with the Azure SQL Database Backup API?

No. This API is read-only - it exposes 4 GET endpoints on RecoverableDatabases and RestorableDroppedDatabases for discovery only. To perform an actual restore or failover, use the broader Azure SQL Database management API or the disaster-recovery configurations API.

### What are the rate limits for the Azure SQL Database Backup API?

The API is governed by Azure Resource Manager throttling: typically 12,000 read requests per hour per subscription and per region, with 429 responses including a Retry-After header. Limits are shared across all Microsoft.Sql operations in the subscription.

### How do I list recoverable databases through Jentic?

Run pip install jentic, then search Jentic with the query 'list azure sql recoverable databases'. Jentic returns the RecoverableDatabases_ListByServer operation on the path /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases. Load its schema and execute with subscriptionId, resourceGroupName, and serverName.

### What backup metadata does this API return?

For recoverable databases: edition, elasticPoolName, lastAvailableBackupDate, and serviceLevelObjective. For restorable dropped databases: creationDate, databaseName, deletionDate, earliestRestoreDate, edition, elasticPoolName, maxSizeBytes, and serviceLevelObjective.

### Is the Azure SQL Database Backup API free?

The control-plane API itself does not incur direct call charges, but the underlying SQL Database service and its geo-redundant backup storage are billed per the database tier and storage consumed. See the Azure SQL Database pricing page for current rates.

### Can I limit what my agent is allowed to do with the Azure SQL Database Backup API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use. Since the server and database names travel in the URL path, a rule can pin the agent to a single Azure SQL Server so it only lists recoverable and restorable-dropped databases there and touches nothing else. Every operation on this surface is a read-only GET, so you can further restrict the agent to just the lookups it needs, such as listing recoverable databases, and no write or restore action is possible.
