What is an API?
API stands for “Application Programming Interface”. It enables web applications to fetch data from the server. Application talks to the server and lets it know in what form the application needs the data via an API.
API ~Buttons in a washing machine. It is an interface that allows to interact with the application.
Another example is as below:
API provides standardised way of moving data back and forth with sets of protocols, routines and developer tools. APIs collect data | connects web applications.
API key is user name and password that allows a set of clients to make an API call [ More secure through authentication tokens*].
API endpoint or URL = Protocol+root end point+resource-path. There can be path parameters or query parameters in addition to this.
Products on multiple platforms commonly use RESTFUL APIs. Eg., Phonepe, GoogleMaps, weather etc.
Software integration is usually made through RESTAPI.
REST APIs calls are made on top of HTTP. Any program/application/scripts ( browsers, curl, android app, python program) which can make HTTP request, can be used to make REST API calls as well.
Internal API : Micro services like payment, shipping, chatbot, notifications etc. External API: Paytm, Youtube, Login through Facebook/Google/Linkedin.
API endpoint or URL = Protocol+root end point+resource-path+[query parameter].
Basic Operations of the API:
GET : Retrieve resource ( Photos/texts)
POST: Create resource
PUT: Update resource
DELETE: Delete resource
RESTAPIs response for or contract is usually in JSON