In this video, Emmanuel Henri explains the basics of RESTful APIs, and what GET, POST, PUT and DELETE are, and the HTML endpoints.
- [Instructor] Before we actually start building our backend and API, let's cover some quick basics around RESTful API. What it is and how we're going to build our application around it. Keep in mind this is a quick overview of what a RESTful API is. And if you need a deeper understanding, take a look at Learning RESTful API in our library. Also, feel free to skip this video if you're fairly familiar with the subject. So, in a nutshell, a RESTful API is a way to transact with a backend using HTTP transactions.
We use a series of calls like GET, POST, PUT, and DELETE with an HTML address to transact with our back end and its data. So when a front-end client, WEP, or mobile needs to do transactions with a back end, it makes a call. Like, for example, GET, when an API endpoint that looks like an HTML URL. And the API responds with a success or failure with data, if need be. For example, we use GET calls to pull the data from the backend.
Then if we need to add new data, we use POST. Next, if we need to update the data, we use PUT. And, finally, DELETE. Well, if you need to delete data. If you're really new to APIs and endpoint, and you're not quite grasping how these work, I'll point out these items as we build our application to make sure they make sense as we implement our API.
- Setting up a project and a server
- Setting up a database and schema
- Creating POST, GET, PUT, and DELETE endpoints
- Serving files