API stands for Application Programming Interface (main participant of all the interactivity)
It is like a messenger that takes our requests to a system and returns a response back to us via seamless connectivity.
We use APIs in many cases like to get data for a web application or to connect to a remote server that has data like weather that keeps changing or to enable two applications to exchange data among each other.
API not only provide reusability of code but also uses the concept of Abstraction (showing functionality by hiding complexity).
Most common real life use of API concepts include:
- Waiter in a restaurant taking your order request to the chef and bringing back the requested dish
- Switchboard turning off the tubelight just on a single press
- Booking a flight online from sites like MMT(web based)
- Signing up in a shopping site from Facebook Account(web based)
- XML-RCP/SOAP: Both uses XML
- JavaScript: Focused around JavaScript
- RESTful APIs: HTTP protocol (HyperText Transfer Protocol) used (best for web APIs)
{
"current_user_url": "https://api.github.com///user",
"current_user_authorizations_html_url": "https://github.com/settings/connections/applications%7B/client_id%7D",
"authorizations_url": "https://api.github.com///authorizations",
"code_search_url": "https://api.github.com///search/code?q=%7Bquery%7D%7B&page, per_page, sort, order}",
"commit_search_url": "https://api.github.com///search/commits?q=%7Bquery%7D%7B&page, per_page, sort, order}",
"emails_url": "https://api.github.com///user/emails",
"emojis_url": "https://api.github.com///emojis",
"events_url": "https://api.github.com///events",
"feeds_url": "https://api.github.com///feeds",
"followers_url": "https://api.github.com///user/followers",
"following_url": "https://api.github.com///user/following%7B/target%7D",
"gists_url": "https://api.github.com///gists%7B/gist_id%7D",
"hub_url": "https://api.github.com///hub",
"issue_search_url": "https://api.github.com///search/issues?q=%7Bquery%7D%7B&page, per_page, sort, order}",
"issues_url": "https://api.github.com///issues",
"keys_url": "https://api.github.com///user/keys",
"notifications_url": "https://api.github.com///notifications",
"organization_repositories_url": "https://api.github.com///orgs/%7Borg%7D/repos%7B?type, page, per_page, sort}",
"organization_url": "https://api.github.com///orgs/%7Borg%7D",
"public_gists_url": "https://api.github.com///gists/public",
"rate_limit_url": "https://api.github.com///rate_limit",
"repository_url": "https://api.github.com///repos/%7Bowner%7D/%7Brepo%7D",
"repository_search_url": "https://api.github.com///search/repositories?q=%7Bquery%7D%7B&page, per_page, sort, order}",
"current_user_repositories_url": "https://api.github.com///user/repos%7B?type, page, per_page, sort}",
"starred_url": "https://api.github.com///user/starred%7B/owner%7D%7B/repo%7D",
"starred_gists_url": "https://api.github.com///gists/starred",
"team_url": "https://api.github.com///teams",
"user_url": "https://api.github.com///users/%7Buser%7D",
"user_organizations_url": "https://api.github.com///user/orgs",
"user_repositories_url": "https://api.github.com///users/%7Buser%7D/repos%7B?type, page, per_page, sort}",
"user_search_url": "https://api.github.com///search/users?q=%7Bquery%7D%7B&page, per_page, sort, order}"
}
List in JSON format
- https://api.github.com///feeds
Output:
{ "timeline_url": "https://github.com/timeline", "user_url": "https://github.com/%7Buser%7D", "security_advisories_url": "https://github.com/security-advisories", "_links": { "timeline": { "href": "https://github.com/timeline", "type": "application/atom+xml" }, "user": { "href": "https://github.com/%7Buser%7D", "type": "application/atom+xml" }, "security_advisories": { "href": "https://github.com/security-advisories", "type": "application/atom+xml" } } } - https://api.github.com///rate_limit
{ "resources": { "core": { "limit": 60, "remaining": 56, "reset": 1567928119 }, "search": { "limit": 10, "remaining": 10, "reset": 1567924666 }, "graphql": { "limit": 0, "remaining": 0, "reset": 1567928206 }, "integration_manifest": { "limit": 5000, "remaining": 5000, "reset": 1567928206 } }, "rate": { "limit": 60, "remaining": 56, "reset": 1567928119 } }