Written By Jess Feldman
Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.
Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.
REST APIs are relied upon by today’s software engineers and are a cornerstone of the web. But what is a REST API and how exactly is it used on the job? From general concepts to the core principles, Rich Greenhill of Thinkful breaks down the inner workings of REST APIs. Find out what it takes to create and use REST APIs, and how the Software Engineering curriculum at Thinkful prepares students to use REST APIs in their first jobs!
API stands for Application Programming Interface. There are many types of APIs used today, but the term is also commonly used to refer to an internet-connected data service. APIs are the communication between two computer systems. They also generate boundaries on how they may be used within a library.
How do software engineers use APIs?
Software engineers are responsible for devising the interface for two systems to communicate with one another. A software engineer may develop a small internal library or even a single file, then they can offer this API to other software engineers so they can utilize it. Ultimately, it’s up to the author of an API to determine what information is accessible.
It’s nearly essential that new software engineers understand REST APIs. An understanding of REST APIs applies to any kind of web application development position because they are so prevalent in the world of web-based data services. New software engineers should have a basic awareness of:
In a more traditional software development role such as a non-network-connected application or gaming app that is not making network requests, it may not be so important to understand REST APIs.
REST stands for Representational State Transfer.
REST is both the interface and a set of standards and principles that offers uniformity of an interface between two systems. REST evolved with web development as web pages went from static and non-interactive to rich, interactive web applications that needed multiple data services to transfer that information. REST follows a set of principles used to design something new on the web or update an interface between two systems on the web.
The counterpart to Representational State is Constant State, which is simply the source where data is stored in a particular format, such as a SQL database where the actual storage of data is in a table format. However, when a client or team needs data in a different format, we call this temporarily generated version of data its represented state. For example, an Internet of Things (IoT) device may only need a partial record from a database in a format different to SQL.
What does it mean for an API to be “RESTful?”
Since uniformity is a key part of REST, RESTful APIs are predictable. With its set of standards and principles, a software engineer can generally know what to expect from a RESTful API. A software engineer just needs to identify which resources the RESTful API is offering and then they understand quickly how to retrieve what they need – that could be a collection of data, a single data point, or a filtered collection.
If the API is not RESTful, then a software engineer will have to read the full documentation to understand the interface in order to retrieve the data they seek.
REST and HTTP were created in the same era of computer history. REST and HTTP actually work together in a system, but are not the same.
HTTP stands for Hypertext Transfer Protocol. An HTTP request can be thought of like a mobile phone text message between two people, except it's one machine sending a message to another and it must follow a specific format that includes a status line, headers, and an optional body of data. Two primary types of requests are:
While REST also allows two machines to communicate with each other over the web, REST has further restrictions. A REST API includes the additional guidelines as detailed in the rest of the doc, such as uniformity, represented state, etc.
Web APIs and HTTP APIs are interchangeable. REST may apply to a web API, but since REST is a set of principles, it can apply outside of web-based APIs.
How does a Web API actually work?
In the context of web APIs, to make a request over the web, we use HTTP. Using HTTP enforces that every request a software engineer makes is delivered in two parts:
Here is an example HTTP request made up of a status line, headers, and no data body:
GET /blog HTTP/1.1
Host: coursereport.com
Connection: keep-alive
Accept: text/html
Learning how to create and use your own REST APIs requires a bit of foundational knowledge. That said, in the grand scope of computer science concepts, RESTful APIs are a relatively lightweight thing to study, practice, and use daily. To get started on learning REST APIs:
There are an array of programming languages you can use to build an API. Whether a back end developer builds an API to be used as a data service for other developers or a front end developer consumes an API that someone else has written, the programming language for a REST API is pretty agnostic. That said, as an API beginner, choose a programming language, like JavaScript. With this language, you will be sending instructions to your machine to make specific calls.
Learning REST APIs at Thinkful
Thinkful offers an immersive Software Engineering Bootcamp that teaches everything you need to know to get started using REST APIs. At Thinkful, we begin with an assumption that our students have no programming knowledge, and we offer all the tools needed to help our students build a website from scratch:
To get to know RESTful principles and their applications to software engineering, a good reference point is GitHub's JSON API. GitHub documentation follows the RESTful principles and is really easy to dive into. The Json API specs go deeper into using RESTful principles with the JSON data format. JSON is platform-agnostic and uses a text format with a specific syntax for sending richer data, like numbers, arrays, and nested objects across any systems. Some libraries have prebuilt REST APIs, so you could also practice front end coding without having to build and customize a REST API. Libraries can act as a test bed for front end client code that you want to try.
Find out more and read Thinkful reviews on Course Report. This article was produced by the Course Report team in partnership with Thinkful.
Jess Feldman is an accomplished writer and the Content Manager at Course Report, the leading platform for career changers who are exploring coding bootcamps. With a background in writing, teaching, and social media management, Jess plays a pivotal role in helping Course Report readers make informed decisions about their educational journey.
These are 3 AI tools you want to know before your first tech interview!
A TripleTen career coach answers what to do in the first 90 days after bootcamp graduation!
Learn how to launch a career as a technical writer!
Find out the fundamentals of cloud engineering and how to launch a career in the Cloud!
Follow our tips to help you choose between these two, in-demand tech careers!
Hack Reactor's Zubair Desai shares how bootcampers should (and shouldn't!) use GenAI...
Lighthouse Labs walks us through cybersecurity jobs across 6 different industries!
Why You Should Learn CSS If You’re Not a Software Engineer
A Fullstack Academy instructors shares how AI is used in Data Analytics!
Codesmith CEO Will Sentance walks us through the importance of software engineers in the AI age
Sign up for our newsletter and receive our free guide to paying for a bootcamp.
Just tell us who you are and what you’re searching for, we’ll handle the rest.
Match Me