RESTful APIs and Frameworks

Learning Objectives

Lesson

This lesson is designed to be completed offline through self-study.

Pluralsight Logo

Introduction to REST

Please complete the following sections of the Designing RESTful APIs course on Pluralsight:

Designing RESTful APIs

Implementing a RESTful API (Language specific)

You will firstly need to establish what framework is used by your company to create RESTful APIs in your programming language. For example, Node Express is used to create APIs in JavaScript and Spring Boot is one of the frameworks used to create APIs in Java.

Next, find a course, either in Pluralsight or elsewhere which explains how to implement a REST API in your chosen framework.

For Java developers you may find section "Using Spring Boot to Create Applications" of the Spring Boot Pluralsight course useful (20 mins).

Create your first Spring Boot Application

If you are using Javascript you may find the following sections of the NodeJS Express Pluralsight course useful:

Learn Express REST NodeJS

Assignment

  1. Using Postman, make a GET request to https://http-challenge.multiverse-coaches.io. Follow the instructions you receive from the response and try to complete the challenge.

  2. Implement the following "Messages" APIs in your framework of choice. Note that it is fine to hardcode the responses for now unless you are confident with using a database to retrieve/add data in which case you can modify the request/response bodies as appropriate:

    MethodResourceRequest bodyResponse bodyResponse status code
    GET/messagesN/A{"message":"GET all messages response from server"}200
    POST/messages{"message":"POST request from client"}N/A201
    GET/messages/{id}N/A{"message":"GET a single message from server"}200
    PUT/messages/{id}{"message":"PUT request from client"}N/A200
    DELETE/messages/{id}N/AN/A200
  3. Test the API using Postman

  4. Commit your code to GitHub and notify your coach that this assignment is complete.