What Is A RESTful or REST API? Explanation of REST API & API
Application Program Interface: In basic terms, APIs just allow applications to communicate with one another. Basically, an API specifies how software components should interact. Additionally, APIs are used when programming graphical user interface (GUI)
Example: When we visit any website we can see an option for login or signup that is "Sign in with google" that time the website used to grap data from google and use it for sign up or sign in. This is how API are used to interact one website with another.
Rest API: Rest stands for Representational State Transfer. REST determines how the API looks like. It stands for “Representational State Transfer”. It is a set of rules that developers follow when they create their API.
How rest api work: Client or user of a website send request to the server to show some data server interact with database and filter the specific data that user want to see and respond with that data to user.
There are 4 methods in rest api. Put and Patch used to update from database, get used to send request to show some data to database, client send post post request to post or add some some data to the database, delete is for deleting data from database.
Json stands for JavaScript Object Notation by using this format user, server and database send or receive data.
No comments: