KnowledgeCity

REST API Basics

REST (Representational State Transfer) APIs are simple to use but enormously powerful.

REST (Representational State Transfer) APIs are simple to use but enormously powerful. To start the course, you will first learn about the fundamental concepts behind web APIs and the defining principles of REST. This includes six defining principles: uniformity, client/server decoupling, statelessness, caching, layers, and code on demand Many thousands of APIs are available—REST and otherwise—and new variations in the form of mashups are created every day. The potential for information discovery is limitless, but how can you find and test existing APIs? You will learn how to use free, public directories to find APIs in a variety of categories. You'll also see how various APIs are structured and marketed depending on purpose and cost.

The format of data that is transmitted using APIs is also critical for consistent and accurate reflection of object state and changes to state. You will learn about common data formats such as XML and JSON and see how JSON has become the standard for REST APIs.

Learning Objectives:

  • Identify the core benefits of web APIs
  • Define REST and its core principles
  • Understand how public APIs are discovered and accessed
  • Differentiate between XML and JSON formats

Author: Josh Guardino

Duration: 14m · 3 lessons
Level: Beginner
Language: English

Skills you’ll gain

API DesignApplication Programming Interface (API)ASP.NET Web APIREST API DevelopmentRest ClientRESTful API

What You'll Learn

  • Identify the core benefits of web APIs
  • Define REST and its six core principles: uniformity, client/server decoupling, statelessness, caching, layers, and code on demand
  • Discover and access public APIs using free, public directories across a variety of categories
  • Differentiate between the XML and JSON data formats
  • Recognize how JSON has become the standard data format for REST APIs

Key Takeaways

  • REST (Representational State Transfer) APIs are simple to use but enormously powerful.
  • REST is defined by six core principles: uniformity, client/server decoupling, statelessness, caching, layers, and code on demand.
  • Free, public directories let you find APIs across a variety of categories, and APIs are structured and marketed differently depending on their purpose and cost.
  • The format of transmitted data is critical for consistent, accurate reflection of object state, and JSON has become the standard data format for REST APIs.

Frequently Asked Questions

What does this REST API Basics course cover?

The course covers the fundamental concepts behind web APIs and the defining principles of REST, including its six principles (uniformity, client/server decoupling, statelessness, caching, layers, and code on demand), how to find and test existing public APIs using free directories, and common data formats such as XML and JSON.

What are the six defining principles of REST taught in this course?

The six defining principles of REST are uniformity, client/server decoupling, statelessness, caching, layers, and code on demand.

How will I learn to find and test existing APIs?

You will learn how to use free, public directories to find APIs in a variety of categories, and see how various APIs are structured and marketed depending on their purpose and cost.

Which data formats does the course address?

The course covers common data formats including XML and JSON, and explains how JSON has become the standard for REST APIs.

What lessons are included in the course?

The course includes three lessons: The World of APIs; Rest Object State and Representation; and Data Transfer Using Common Formats.

Transcript

Show transcript (free preview lesson)

Transcript of the free preview lesson. Remaining lessons unlock with the full course.

Hello, my name is Josh Guardino, and in these lessons, you will learn the basics of APIs. We'll talk about what an API is, why they're important, and where they may be found. Let's begin by defining the acronym, API, which stands for application programming interface. An API is simply a means by which computers or processes may communicate with each other. This is not a new term, but its connotations have changed somewhat over recent years. Many associate the term API with web APIs, which are the types of APIs that we will explore. A web API is simply a network-enabled API that exposes data to client applications or services. The advent of the information age has seen a dramatic increase in the amount and scope of data that is available through web APIs, but where can these APIs be found? There are numerous sources of API information on the internet, including directories that list and catalog APIs by a number of criteria. For example, the United States government operates data.gov, which contains a vast array of federal government data sources, including, but not limited to, APIs. Information about thousands of data sources is available at data.gov and they are all free for public use. Other popular API-focused sites include ProgrammableWeb, which maintains an extensive directory of APIs. Sources like this provide a great way to find and explore many types of APIs and provide tutorials and information for beginners. They also allow other users to stay in touch with information about new and trending APIs. For example, let us look at the weather category. On ProgrammableWeb, there are well over 300 APIs just in the weather category alone and each of these listings contains important information about the API, including the base endpoint or URL at which the services may be accessed, the vendor or organization's website, secondary categories or tags, information about social media related to the API, terms of service, and information about the architectural style. In this example, REST is the architectural style and that will be the focus of these lessons. REST is not the only type of API style, but it is the most popular. Virtually all modern APIs support REST. REST is a powerful and easy-to-use style that is strongly rooted in the core principles and protocols that support the internet. APIs may also be classified as public or private. A public API is simply one that is exposed over the internet rather than hidden within a private network. Public does not necessarily mean free, nor does it imply that there is no means of authentication. However, many APIs, and not just those provided by the government, are available for free use. Commercial API vendors are those that offer their most valuable services to paying customers only. These fees can be many thousands of dollars and provide an important means of revenue generation for organizations looking to monetize their data. For example, Aviation Edge offers many APIs with information about airlines, flights, and schedules. As is typical with many commercial APIs, Aviation Edge offers a free level of access, which usually includes a limited set of data or a restricted number of calls to the API. Another such example is WeatherUSA, which offers a variety of weather-based API services with a tier-based pricing model, including a starter level with restricted access and data, but free tiers offer developers an opportunity to explore the dataset and to evaluate the service for potential upgrade to a paid service. Postman, which provides the software tool that we will be using in these lessons, also provides an API network that lists more than 12,000 APIs and allows developers and organizations to share their workspaces. The Postman network also includes information for beginners and ready-made Postman requests for sample public APIs. Another way to exploit the power and interoperability of APIs is to use API mashups. Mashups involve the blending of data from multiple APIs to create a new data source powered by the APIs that they use. Data mashups often reveal new information and insights that could not be realized with the individual data sources alone. APIs are a very powerful and important component of the modern internet and they are a vital factor in the data economy in which we live. Thanks for watching. Stay tuned for the next lesson, where I will show you how to use REST, or representational state transfer-based APIs.

Learn on the Go

Take your learning anywhere — the KnowledgeCity mobile app lets you watch lessons on the go.