Working with REST API's in JavaScript

Paths

Working with REST API's in JavaScript

Authors: Nate Taylor, Paul D. Sheriff, Mike Van Sickle, Deeksha Sharma, James Millar

A REST API is a way of easily accessing web services. When a RESTful API is called, the server will transfer to the client a representation of the state of the requested resource.... Read more

What You Will Learn

  • In this path you will learn what a JavaScript REST API is and how to begin creating them for your projects. We will start with CRUD basics then move into more advanced of uploading files, securing your API and caching data with local storage.

Pre-requisites

  • HTML
  • CSS
  • JavaScript

Working with REST API's in JavaScript

In this path you will learn what a JavaScript REST API is and how to begin creating them for your projects. We will start with CRUD basics then move into more advanced of uploading files, securing your API and caching data with local storage.

JavaScript REST APIs: The Big Picture

by Nate Taylor

Nov 20, 2020 / 38m

38m

Start Course
Description

When learning, it's easy to just jump into the weeds of how to write in a specific language. However, ignoring why a technology is used can lead to confusion and stress. In this course, JavaScript REST APIs: The Big Picture, you’ll learn why REST APIs are useful in building JavaScript applications. First, you’ll explore what REST is and why you would use it. Next, you’ll discover where REST fits within the confines of a JavaScript application. Finally, you’ll learn when and where to use some of the various JavaScript options for building REST APIs. When you’re finished with this course, you’ll have the knowledge needed to know if building a REST API is the right choice for your application.

Table of contents
  1. Course Overview
  2. How REST Helps Build Applications
  3. Using JavaScript with REST

JavaScript REST APIs: Getting Started

by Paul D. Sheriff

Jun 19, 2020 / 1h 23m

1h 23m

Start Course
Description

With the amount of mobile applications and the need for fast websites, REST API developers are in high demand. In this course, JavaScript REST APIs: Getting Started, you’ll learn to build a simple Node.js and express server and create a set of endpoints. First, you’ll be shown how to build an endpoint to retrieve data. Next, you’ll discover how to create endpoints for POST, PUT, PATCH and DELETE. Then, you'll delve into the different HTTP status codes you should return from each endpoint. Next, you’ll explore how to handle exceptions and return a standardized JSON document. Finally, you’ll see how to call your REST APIs from JavaScript using the XMLHttpRequest object. When you’re finished with this course, you’ll have the skills and knowledge of Node.js, Express, and JavaScript needed to build your own REST APIs for use in mobile or other applications.

Table of contents
  1. Course Overview
  2. Build a Node Server for REST API Methods
  3. Retrieve and Search for Data Using REST API Methods
  4. Build REST API Methods to Modify Data
  5. Handling Exceptions in REST API Methods
  6. Call REST API Methods from an HTML Page

Building CRUD Actions in a JavaScript REST API

by Nate Taylor

Sep 30, 2020 / 1h 40m

1h 40m

Start Course
Description

Manipulating data is the core of almost every application. One popular approach to manipulating data is using a REST API to perform create, read, update, and delete actions on data. In this course, Building CRUD Actions in a JavaScript REST API, you’ll learn to manipulate data with a JavaScript REST API. First, you’ll explore how to create the basic API. Next, you’ll discover how to filter results via the API. Finally, you’ll learn how to call the API from the client. When you’re finished with this course, you’ll have the skills and knowledge of REST APIs needed to manipulate data with a JavaScript REST API.

Table of contents
  1. Course Overview
  2. Creating the API
  3. Connecting the Front End
  4. Searching Data
  5. Validating Data

Uploading Files with a JavaScript REST API

by Mike Van Sickle

Aug 5, 2020 / 1h 26m

1h 26m

Start Course
Description

Web applications are responsible for managing a lot of different types of data.

Strings of text are used for names and descriptions, dates are used to track what happened when, and numbers are used to quantify and measure an application’s data. Among these data types, files present a unique set of challenges to manage securely and efficiently.

In this course, Uploading Files with a JavaScript REST API, you’ll learn about the options you have for uploading files from the browser to the server.

First, you’ll explore how to handle a single file at a time.
Next, you’ll expand your knowledge by examining how to upload multiple files at a single time.
Finally, you’ll learn how to manage the files once they get to the server.

When you’re finished with this course, you’ll have the skills and knowledge of uploading files with JavaScript needed to choose the most effective option for your use-case and implement it efficiently.

Table of contents
  1. Course Overview
  2. Uploading Single Files
  3. Uploading Multiple Files
  4. Managing Files on the Server

Securing a JavaScript REST API with JSON Web Tokens

by Deeksha Sharma

Sep 24, 2020 / 1h 26m

1h 26m

Start Course
Description

For server side JavaScript applications, securing protected routes and working with authorization is often a challenging task. In this course, Securing a JavaScript REST API with JSON Web Tokens, you’ll learn to use the mechanism of JWT also read as JOT to transfer claims between two parties. First, you’ll explore how to protect the server side REST API endpoints from unauthorized access and data tampering. Next, you’ll discover how servers can generate, sign, send, and validate claims in the JSON Web Tokens. Finally, you’ll learn how to make tradeoffs when storing JWT, security considerations, possible JWT attacks and security best practices to mitigate the risk. When you’re finished with this course, you’ll have the skills and knowledge of JWT fundamentals needed to design and ship robust RESTful APIs in the JavaScript ecosystem.

Table of contents
  1. Course Overview
  2. Project Set up, Create Login API, and Users
  3. Implement Backend APIs and Introduction to JWT
  4. Add Security to API Endpoints with JWT
  5. Authorization with JWT Claims

Caching JavaScript REST API Data with Local Storage

by James Millar

Oct 9, 2020 / 1h 28m

1h 28m

Start Course
Description

Storing API data client-side and keeping it synchronized can be a challenge, but if done well it can increase performance and improve the user experience. In this course, Caching JavaScript REST API Data with Local Storage, you’ll learn how to use local storage and pouchDB to store and maintain data received from a restful API. First, you’ll explore how local caching works and explore the differences between the different options. Next, you’ll discover how to retrieve data from an API and store it locally. Finally, you’ll learn how to store JSON documents in pouchDB. When you’re finished with this course, you’ll have the skills and knowledge of the HTML local storage API needed to store Rest API data locally in the browser.

Table of contents
  1. Course Overview
  2. Introducing Local Storage
  3. Storing API Data Locally
  4. Keeping Data Fresh
  5. Storing Data in PouchDB