canonical: https://jentic.com/apis/azure.com/sqlmanagementclient

# Microsoft Azure SqlManagementClient

Jentic publishes the only available OpenAPI specification for SqlManagementClient, keeping it validated and agent-ready. The Azure SQL Database management API exposes a RESTful interface for inspecting database schema metadata on Azure SQL Database servers, including schemas, tables, and columns under a given database. It targets the database-schema management surface of the broader Azure SQL control plane and is scoped to read operations on schema, table, and column resources. Use it when an agent needs to introspect the structure of an Azure SQL Database before issuing queries or generating data models.

## For AI agents

List schemas, tables, and columns inside an Azure SQL Database server so an agent can reason about database structure before running queries.

## Scope

Does not run SQL queries, manage server-level firewall rules, or provision databases - use for schema, table, and column metadata introspection only.

## Capabilities

- List all schemas defined inside a specific Azure SQL Database
- Retrieve detailed metadata for a named schema in a database
- Enumerate every table contained within a given schema
- Inspect a single table by name to understand its scope and identifiers
- List the columns belonging to a specific table for query planning
- Fetch column-level metadata to drive type-aware query generation

## Use cases

### Pre-Query Schema Discovery

Before issuing SQL against an Azure SQL Database, an application or agent often needs to know which schemas, tables, and columns exist on the target server. SqlManagementClient exposes the schema, table, and column resources under a database so callers can enumerate structure without running INFORMATION_SCHEMA queries against the data plane. This keeps schema discovery in the Azure Resource Manager control plane, with the same auth and audit trail as other Azure operations.

Example prompt: List all schemas in the database 'reporting' on Azure SQL server 'analytics-eu' inside resource group 'data-rg', then list the tables in the 'dbo' schema.

### Documenting Existing Azure SQL Databases

Teams onboarding to an existing Azure SQL Database deployment frequently need to generate up-to-date documentation of schemas, tables, and columns. SqlManagementClient lets an automated job walk the schema tree resource by resource and emit a Markdown or JSON catalog. Because every call goes through Azure RBAC, only principals with reader rights on the SQL server can produce the documentation.

Example prompt: Walk every schema, table, and column on the Azure SQL server 'finance-prod' in resource group 'finance-rg' and emit a JSON catalog grouped by schema.

### Schema-Aware Query Generation by Agents

AI agents that author SQL on behalf of a user need accurate column names and table names; hallucinated identifiers cause query failures and bad data. Through Jentic, an agent can call SqlManagementClient to retrieve the live schema, table, and column definitions for the target database, then ground its generated query in real identifiers. Jentic isolates the Azure OAuth credentials so the agent never handles a refresh token directly.

Example prompt: Use Jentic to load the SqlManagementClient list-columns operation, then call it for the table 'invoices' in schema 'finance' and pass the returned column names to the SQL generation step.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas | List schemas in a database |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName} | Get a specific database schema |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables | List tables in a schema |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName} | Get a specific table |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns | List columns in a table |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName} | Get a specific column definition |

## Key resources

- **Schemas** — List schemas in a database and retrieve a specific schema by name
- **Tables** — List tables under a schema and inspect a single table
- **Columns** — List columns for a table and retrieve a specific column definition

## Why Jentic

- **Setup:** Wiring the Microsoft.Sql schema-introspection surface by hand means registering an Azure AD app, running the OAuth2 token exchange, and handling ARM's HTTP 429 read throttling with Retry-After backoff yourself. Through Jentic you install once, import Azure SQL Management from the API Directory, store the Azure AD service principal credential once, and your agent calls it.
- **Permission scoping:** This API puts the subscription, resource group, server, and database in the URL path (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/...), so a rule can pin your agent to one database. Every operation here is a read over schemas, tables, and columns, so you can limit the agent to exactly the introspection calls it needs, such as listing schemas or listing a table's columns.
- **Credential handling:** Your Azure AD service principal credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list columns of an Azure SQL table' or 'list schemas in an Azure SQL database', and Jentic returns the matching Microsoft.Sql operation with its input schema so the agent calls the right endpoint without reading the ARM reference.

## Related APIs

- **SqlVirtualMachineManagementClient** — Manages SQL Server running on Azure VMs rather than Azure SQL Database PaaS schemas
- **StorageManagementClient** — Manages Azure storage accounts that often back database backups and BACPAC exports
- **Cloud SQL Admin API** — Google Cloud's managed-SQL administration API, equivalent surface for GCP

## FAQ

### Why is there no official OpenAPI spec for SqlManagementClient?

Microsoft Azure publishes Swagger fragments for individual ARM services but does not publish a consolidated, validated OpenAPI 3 spec for the SqlManagementClient schema-introspection surface. Jentic generates and maintains this spec so that AI agents and developers can call SqlManagementClient via structured tooling. It is validated against the live Azure Resource Manager API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the SqlManagementClient use?

All endpoints require Azure Active Directory OAuth 2.0, declared as the azure_auth security scheme in the spec with the user_impersonation scope against https://login.microsoftonline.com. Through Jentic, the Azure access token is held in your Jentic One instance and injected at call time so the agent never sees the raw bearer token.

### Can I list every table in an Azure SQL database with SqlManagementClient?

Yes. Call GET on /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables to enumerate tables under a specific schema. To cover the whole database, first list schemas, then iterate this call per schema.

### What are the rate limits for the SqlManagementClient?

Calls go through Azure Resource Manager, which applies subscription-level read throttling (typically 12,000 reads per hour per subscription, varying by region and tenant). Throttled responses return HTTP 429 with a Retry-After header; the spec does not encode these limits, so handle them in client code.

### How do I introspect Azure SQL columns through Jentic?

Run pip install jentic, search Jentic for 'list columns of an azure sql table', load the SqlManagementClient list-columns operation schema, then execute it with subscriptionId, resourceGroupName, serverName, databaseName, schemaName, and tableName. Jentic returns the column metadata directly without you handling the Azure AD token.

### Does SqlManagementClient let me run SQL queries against the database?

No. This is a control-plane API for schema metadata only. To execute queries you connect to the database over TDS using a SQL driver. Use SqlManagementClient first to discover the structure, then use that information to compose data-plane queries.

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

Yes. Jentic One is self-hosted, so your own rules decide which operations and credentials the agent may use. Because this API puts the subscription, resource group, server, and database in the URL path, you can pin the agent to a single Azure SQL Database. Every operation is a read over schemas, tables, and columns, so you can allow only the introspection calls the agent needs, such as listing schemas or listing a table's columns, and your stored Azure AD service principal credential is injected at call time without ever entering the agent's context.
