What is a REST API? (2024)

Jump to section

Published May 8, 2020

Overview

A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.

What's an API?

An APIis a set of definitions and protocols for building and integrating application software.It’s sometimes referred to as a contract between aninformation provider and an information user—establishing the content required from the consumer (the call) and the content required by the producer (the response).For example, the API designfor a weather service could specify that the user supply a zip codeand that the producer reply with a 2-part answer, the first being the high temperature, and the second being the low.

In other words, if you want to interact with a computer or system to retrieve information or perform a function, an API helps you communicate what you want to that system so it can understandandfulfill the request.

You can think of an API as a mediator between the users or clients and the resources or web services they want to get. It’s also a way for an organization to share resources and information while maintaining security, control, and authentication—determining who gets access to what.

Another advantage of an API is that you don’t have to know the specifics of caching—how your resource is retrieved or where it comes from.

Design tips for microservices developers

REST

REST is a set of architectural constraints, not a protocol or a standard. API developers can implement REST in a variety of ways.

When a client request is made via a RESTful API, it transfers a representation of the state of the resource to the requester or endpoint. This information, or representation, is delivered in one of several formats via HTTP: JSON (Javascript Object Notation), HTML, XLT, Python, PHP, or plain text. JSON is the most generally popular file format to use because, despite its name, it’s language-agnostic, as well as readable by both humans and machines.

Something else to keep in mind:Headersand parameters are also important in theHTTP methodsof aRESTful API HTTP request, as they contain importantidentifierinformation as to the request'smetadata, authorization, uniform resource identifier (URI), caching, cookies, and more. There are requestheadersand responseheaders, each with their own HTTP connection information and status codes.

In order for an API to be considered RESTful, it has to conform to these criteria:

  • A client-server architecture made up of clients, servers, and resources, with requests managed through HTTP.
  • Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected.
  • Cacheable data that streamlines client-server interactions.
  • A uniform interface between components so that information is transferred in a standardform. This requires that:
    • resources requested are identifiable and separate from the representations sent to the client.
    • resources can be manipulated by the client via the representation they receive because the representation contains enough information to do so.
    • self-descriptive messages returned to the client have enough information to describe how the client should process it.
    • hypertext/hypermedia is available, meaning that after accessing a resourcethe client should be able to use hyperlinks to find all other currently available actions they can take.
  • A layered system that organizes each type of server (those responsible for security, load-balancing, etc.) involved the retrieval of requested information into hierarchies, invisibletothe client.
  • Code-on-demand (optional): the ability to send executable code from the server to the client when requested, extending client functionality.

Though the REST API has these criteria to conform to, it is still considered easier to use than a prescribed protocol like SOAP (Simple Object Access Protocol), which has specific requirements like XML messaging, and built-in security and transaction compliance that make it slower and heavier.

In contrast, REST is a set of guidelines that can be implementedas needed, making REST APIs faster and more lightweight, with increased scalablity—perfect for Internet of Things (IoT) and mobile app development.

Get started with Red Hat OpenShift API Management.

Why choose Red Hat?

Red Hat® Integration is an API-centric solution that provides application connectivity and data transformation, service composition and orchestration, real-time message streaming, change data capture, and API management all in one place to connect applications and data across a hybrid infrastructure. It’s combined with a cloud-native platform and toolchain to support modern app development.

Red Hat 3scale API Management is a component of Red Hat Integration, and helps you share, distribute, control, and monetize your APIs on an infrastructure platform built for performance, control, security, and growth. Place 3scale components on-premise, in the cloud, or both.

Keep reading

Article

What is an API?

API stands for application programming interface—a set of definitions and protocols to build and integrate application software.

Article

What does an API gateway do?

An API gateway is an application programming interface (API) management tool that sits between a client and a collection of backend services.

Article

Why Red Hat for APIs?

Our API solutions focus on reusability, IT agility, and a management interface that helps you measure, monitor, and scale.

More about APIs

Products

An infrastructure platform that lets you share, distribute, control, and monetize your application programming interfaces (APIs).

Related articles

Resources

E-book

Open APIs in Financial Services for Dummies

Podcast

Command Line Heroes Season 2, Episode 6:

"The data explosion"

E-book

The API owner's manual

What is a REST API? (2024)

FAQs

What is meant by REST API? ›

A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.

What is a REST API for dummies? ›

A RESTful API is an architectural style for an application programming interface that uses HTTP requests to access and use data. That data can be used to GET , PUT , POST and DELETE data types, which refers to reading, updating, creating and deleting operations related to resources.

What is an example of a REST API? ›

One example is the online weather service OpenWeatherMap. Through its REST API, the service receives requests with location parameters and returns the corresponding weather data.

What is the difference between a REST API and an API? ›

APIs can refer to any type of interface that enables communication between different systems. REST APIs are a specific type of API that adheres to the constraints of the REST architecture. RESTful APIs use HTTP requests to interact with data, while traditional APIs can use a variety of protocols.

What is REST API in layman's terms? ›

REST APIs communicate through HTTP requests to perform standard database functions like creating, reading, updating and deleting records (also known as CRUD) within a resource. For example, a REST API would use a GET request to retrieve a record. A POST request creates a new record.

What is REST in simple words? ›

: to cease from action or motion : refrain from labor or exertion. 3. : to be free from anxiety or disturbance. 4. : to sit or lie fixed or supported.

Why is it called REST API? ›

A REST API (also called a “RESTful” API) is a specific type of API that follows these guidelines. REST stands for Representational State Transfer. When a client requests a resource using a REST API, the server transfers back the current state of the resource in a standardized representation.

What is an API with an example? ›

API integrations are software components that automatically update data between clients and servers. Some examples of API integrations are when automatic data sync to the cloud from your phone image gallery, or the time and date automatically sync on your laptop when you travel to another time zone.

What is an API for beginners? ›

APIs, or application programming interfaces, act as the language that allows different software applications to talk to one another. Imagine you're ordering a coffee at a cafe; the API is like the waiter who takes your order to the barista and then brings your coffee to you.

What are the four types of REST APIs? ›

The main types of APIs include Open, Partner, Private, and Composite APIs. RESTful API is an architectural style characterized by client-server separation, HTTP interface, and statelessness. SOAP, XML-RPC, JSON-RPC, and Thrift are other popular API protocols with unique features and use cases.

Is REST API frontend or backend? ›

As you probably know, a typical modern application consists of 2 main parts: Frontend and Backend. If you want to create a web or mobile app, you need to have at least a basic understanding of REST API which is commonly used on backend development.

Why use API REST? ›

Systems that implement REST APIs can scale efficiently because REST optimizes client-server interactions. Statelessness removes server load because the server does not have to retain past client request information. Well-managed caching partially or completely eliminates some client-server interactions.

Is every API a REST API? ›

Web APIs encompass any API using HTTP or HTTPS. All REST APIs are Web APIs, but not all Web APIs are RESTful. REST APIs are Web APIs that follow specific architectural principles like statelessness and client-server architecture. Technically, they can be stateless or stateful.

Do you need a REST API? ›

REST API use cases

Mobile applications: REST APIs are essential in mobile app development, facilitating data exchange between the app and a server. They help fetch data, send user input data to the server, and more.

What does the API stand for? ›

API stands for Application Programming Interface. In the context of APIs, the word Application refers to any software with a distinct function. Interface can be thought of as a contract of service between two applications. This contract defines how the two communicate with each other using requests and responses.

Is Postman a REST API? ›

Postman began as a REST client and has evolved into today's comprehensive Postman API Platform.

Top Articles
Customer Advisory: Understand the Risks of Virtual Currency Trading
The 10-Minute Rule: A Productivity Game-Changer
Friskies Tender And Crunchy Recall
Foxy Roxxie Coomer
O'reilly's Auto Parts Closest To My Location
Ffxiv Shelfeye Reaver
The UPS Store | Ship & Print Here > 400 West Broadway
Ymca Sammamish Class Schedule
FFXIV Immortal Flames Hunting Log Guide
Umn Pay Calendar
Pike County Buy Sale And Trade
All Obituaries | Ashley's J H Williams & Sons, Inc. | Selma AL funeral home and cremation
Ktbs Payroll Login
Housing Intranet Unt
fltimes.com | Finger Lakes Times
The Witcher 3 Wild Hunt: Map of important locations M19
272482061
Shannon Dacombe
Nashville Predators Wiki
使用 RHEL 8 时的注意事项 | Red Hat Product Documentation
Honda cb750 cbx z1 Kawasaki kz900 h2 kz 900 Harley Davidson BMW Indian - wanted - by dealer - sale - craigslist
Heart and Vascular Clinic in Monticello - North Memorial Health
Project, Time & Expense Tracking Software for Business
Hannaford To-Go: Grocery Curbside Pickup
South Bend Weather Underground
Bidevv Evansville In Online Liquid
Mineral Wells Skyward
Is Holly Warlick Married To Susan Patton
Aes Salt Lake City Showdown
Angel Haynes Dropbox
Till The End Of The Moon Ep 13 Eng Sub
Free Tiktok Likes Compara Smm
140000 Kilometers To Miles
Www.craigslist.com Syracuse Ny
Babbychula
Kstate Qualtrics
Ishow Speed Dick Leak
Scottsboro Daily Sentinel Obituaries
Lyca Shop Near Me
2008 DODGE RAM diesel for sale - Gladstone, OR - craigslist
Ross Dress For Less Hiring Near Me
Nid Lcms
Karen Wilson Facebook
11 Best Hotels in Cologne (Köln), Germany in 2024 - My Germany Vacation
Coroner Photos Timothy Treadwell
Alston – Travel guide at Wikivoyage
Tfn Powerschool
Unit 11 Homework 3 Area Of Composite Figures
Craigslist Pet Phoenix
Strange World Showtimes Near Century Federal Way
Philasd Zimbra
Heisenberg Breaking Bad Wiki
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6591

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.