Reputation: 135
I can get a database usage report (including DB actual and maximum size) for a single database using REST API:
I want to get the same database usage report by server name for all the databases on that server. Is it possible using the Azure REST API?
Upvotes: 0
Views: 645
Reputation: 15648
You can list of all databases contained on that Azure SQL logical server using this REST API.
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases?api-version=2021-05-01-preview
You can then iterate through the list returned and get the database usage for each database using the REST API you referenced in your question.
Upvotes: 1