This video defines API in the context of this course. It shows what an API is, what it's not, and its use in client-server communication.
- [Instructor] Hello and welcome to Section 1: REST Fundamentals. In this section, we will take a broad look on what REST is, and how it can help us build our applications. In particular, we will learn about what an API is and why it is useful. We will discuss the tools that HTTP provides us for building network-based APIs. Then, we will talk about the RESTful approach for architecting APIs. We will close the section by setting up a Node.js developing environment that we need to start using and designing our RESTful APIs.
Now, we move on to the first video of this section. What is an API? In this video, we are going to take a look at what an API is, what is it used for, and what are web APIs. By searching for, what is an API, on Google, we get the following results. Wikipedia tells us that an API is a set of routines for building software applications. HowStuffWorks tells us that an API is a set of instructions for accessing web-based software applications. Both of these answers agree that an API is a set of functions.
In other words, an API is a contract. As this answer on Quora shows. If I were to answer this question, I would simply say that an API is an interface that hides the details of an implementation. For example, the interface to turning on a computer is a power button. This is one function of the interface the computer manufacturer gives us. So, what are APIs used for? APIs are usually used for three things. APIs are used for performing tasks. For example, we may use Twitter's API to search for tweets from San Francisco.
APIs are used for retrieving data. For example, we may use Facebook's API to retrieve a user's friends list. Finally, APIs are used for manipulating data. For example, we may use the Android API to add a new contact. So, what is a web API? A web API is an interface that runs on a network. This means that a task that a client wants to perform, or the data that a client wants to access are on different machines. Web APIs are usually built on top of SOAP or HTTP.
We've come to the end of this video, and we now have a good idea of what an API is, and why is it useful. In the next video, we will learn about the functionality that HTTP provides us. This will help us know the building blocks that we will use for building our APIs.
This Node.js course gives you an overview of a RESTful API and the logical steps of creating one. It explores three different APIs, focusing on their similarities and differences and how to effectively implement one. Instructor Saleh Hamadeh starts off by defining APIs, showing how they can be built on top of HTTP and listing the properties that make an API RESTful. Learn how to develop Twitter Notes, a sample web application that lets users leave notes for their Twitter friends. Use Twitter's API to implement a login flow and then design a web API. Additionally, get a closer look at several other real-world APIs, and learn some best practices to keep APIs secure, maintainable, and efficient.
- Identifying REST resources
- Setting up the development environment
- Consuming a RESTful API
- Creating an OAuth login request
- Getting an access token
- Saving data in MongoDB
- Building a RESTful API
- Testing user-perceived performance
- Looking at APIs in the real world
- Best practices for building RESTful APIs