Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
What is REST ? Representational state transfer (REST) is an architectural style of application programming interfaces . Its purpose is to induce performance, scalability, simplicity, modifiability, visibility, portability, and reliability. REST is the software architectural style of the World Wide Web.What is REST API? A REST API defines a set of functions which developers can use to perform requests and receive responses via HTTP protocol such as GET and POST.REST API's works very similar to website in a browser. A resource is exposed to a program/software via a URL. The program can access that URL and receive data about the resource. This is very similar to you typing in a URL to your browser and getting a web page back.REST API's use HTTP. They can be used by any programming language and easy to test. What is REST API?Azure provides REST API's for performing requests/responses so that programmers can benefit from using them and can programmatically access the resources in Azure. A few examples that comes to my mind are – Import/Export, Performing Geo-replication failovers and Performing Point-in time restore. How to Test REST APIs? Programmers often want to test whether the REST API calls are working fine before implementing in the code changes. A simple of testing whether the REST API calls are working is by using POSTMAN client which is an add-on to Google chrome browser. It is an intuitive user interface that would make testing APIs effortless.It can be downloaded from the URL :- https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomopor https://www.getpostman.com/ Testing Azure REST API using POSTMAN Client : We can test REST API call for Azure using POSTMAN client. The scenario chosen in this context is - Initiating an unplanned failover from the primary database to the secondary database for an Azure SQL database configured for Geo-replication. We are going to use OAuth 2.0 as authentication mechanism for this demo. In short, we are going to use OAuth 2.0 to generate access token by passing Auth URL, Token URL, client id and client secret.If you are interested in learning more about OAuth 2.0, the following article can help you. https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-codeBelow are the detailed steps that needs to be followed to achieve this : 1. Create a new active directory if you don't have one. If you already have one, you can use the existing active directory.2. Add an application to the active directory.![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() ![]() ![]() ![]() ![]() |
Comments
- Anonymous
November 22, 2016
Very detailed and well written post Suhas. Thank you for sharing. I have used it multiple times :)