Sohrab
Sohrab

Reputation: 1488

Query Azure SQL Database using Rest-API

I have a SQL database server in Microsoft Azure. I want to use Azure Rest-API to select some records from a table. When I refer to Azure SQL Database REST API I can't find any section for this purpose, just I can get a DB information, server info or something like this. here is no suitable API to select or update a table. Could you please help me?

Upvotes: 8

Views: 25891

Answers (2)

Rom Eh
Rom Eh

Reputation: 2063

As mentioned in the article, the Azure SQL Database REST API is designed for the management of the database and the server.

To query a SQL Database with REST queries, you can have a look at ODATA as explained on this post : How to expose Azure Sql Server database using OData.

Upvotes: 5

Sohrab
Sohrab

Reputation: 1488

I asked this question in Microsoft Azure Forum. The answer is like Rom Eh answer. You can see Microsoft team's answer in the following: You cannot make a query against your database hosted in Azure SQL Database using Azure Resource Manager REST API. The built-in REST API is supported for server and database management. This means you can only perform CRUD at server or database level (e.g. creating a new database, updating some settings). You can use OData as it is supported in Azure SQL Database query.

And related link: https://social.msdn.microsoft.com/Forums/azure/en-US/25d9baa4-2510-4ce4-b857-70a07e4ddea4/query-azure-sql-database-using-restapi?forum=azureapimgmt

Upvotes: 3

Related Questions