REST[Representational State Transfer]: Click this link for REST API Basics
- A RESTful API — also referred to as a RESTful web service — is based on representational state transfer (REST) technology, an architectural style and approach to communications often used in web services development.
- A Rest API Works the same way normal Client Server Application Works.
Example 1 Facebook API:
- Access the Facebook API by accessing the url https://developers.facebook.com/tools/explorer/ in a browser.
- Fetch the Access Token by clicking on GetToken->Get User Token->Provide credentials of Facebook. Automatically the Access Token is updated in the text box.
- Provide the Query Params as mentioned below :
- Retrieve up to five albums created by someone, and the last five posts in their feed.
- Retrieve the photos
Example 2 Google Maps API:
- Open Chrome Browser
- Provide the following url and verify the JSON[Java Script Object Notation]
Validating the JSON Response:
- Access jsonpath.com
- Provide the response and verify the content as mentioned below:
Accessing the Facebook API from Postman
- Download postman plugin in chrome.
Launch Postman and update the following
- URL https://graph.facebook.com/me
- method type GET
- access_token=<access_token from Example 1 Facebook API Step2 as mentioned above>
Accessing the Facebook API from WebBrower
- Open the browser
Enter the following url
https://graph.facebook.com/me?access_token=<access_token from Example 1 Facebook API Step2 as mentioned above>&fields=id,name,picture