Query Azure SQL Database using Rest-API

16,855

Solution 1

As mentionned 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.

Solution 2

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

Share:
16,855
Sohrab
Author by

Sohrab

Updated on June 17, 2022

Comments

  • Sohrab
    Sohrab almost 2 years

    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?

  • Rom Eh
    Rom Eh about 6 years
  • Rom Eh
    Rom Eh about 6 years
    I am not sure to have mentionned this link. However, you can search in your favorite search engine "Azure SQL Database ODATA", and you will find many links to explain how to do this.
  • Nouman Qaiser
    Nouman Qaiser over 3 years
    The links to odata in most blogs are dead. Likely indicating this is not offered by microsoft any longer.