DEV Community

loading...
Cover image for 🌎 What is a REST API ? 10 best practices when building a REST API

🌎 What is a REST API ? 10 best practices when building a REST API

Prikesh Savla
I am a full stack developer who has tried Ruby, PHP, trying to learn Node. I have been developing a lot in Javascript.
・1 min read

An API, or application programming interface, is a set of rules that define how applications or devices can connect to and communicate with each other.

An API needs to meet the following rules to be called a RESTful / REST API.

  • Client-server: A RESTful API follows the client-server model where the server serves data and clients connect to the server to consume data. You can use Hoppscotch as a client for your API server to build and understand how API is used in the real world.

  • Stateless: A RESTful API should be stateless. Each request is treated as a standalone request. The server should not keep track of any internal state that might influence future requests.

  • Uniform interface: All API requests for the same resource should look the same, no matter where the request comes from.

The go-to Open-source tool for building an API would be Hoppscotch (previously known as Postwoman). It is crafted with Vue.js and a minimalistic design. You can save it as a PWA and use it whenever you want, like a desktop or a mobile app.

Read the full article where we talk about the 10 best practices to build a robust and secure REST API

Discussion (0)