Unlocking the Power of API

Unlocking the Power of API

APIs

API stands for Application Programming Interface, and the building blocks of modern software because they allow for the sharing of resources and services across applications, organization's, and devices.

Networking Terms Used in API

TermDescription
ClientThe requester. (i.e. your browser or an app)
APISimplified interface for interacting with the backend
ServerThe backend where the processing happens

Types of APIs

There are three types of APIs described below

  1. Hardware APIs - Interface for software to talk to hardware.

  2. Software Library APIs - Interface for directly consuming code from another code base.

  3. Web APIs - Interface for communicating across code bases over a network.

Architecture For APIs

  • REST (Representational State Transfer) - Representational State Transfer, is a design pattern for building web services.

  • GraphQl - A query language and runtime for Building APIs

  • WebSocket - Protocol for bi-directional communication that allows data to be exchanged in real-time via a single, permanent connection.

  • Webhooks - Apps can communicate real-time data to other apps or services through automated notifications.

  • SOAP (Simple Object Access Protocol) - a messaging protocol for exchanging structured data

  • gRPC (Google Remote Procedure Call) - Google created a high-performance, language-neutral RPC framework to facilitate effective inter-service communication.

  • MQTT (MQ Telemetry Transport) - Lightweight messaging protocol for IoT devices, emphasizing low bandwidth and battery usage.

How To Access APIs

There are three scopes of ways through which we can interact and use APIs

  1. Public APIs (known as Open APIs) - Used by anyone who discovers the API

  2. Private APIs - Used only within an organization and not made public

  3. Partner APIs - Used between one or more organizations that have an established relationship

REST (Representational State Transfer):-Request methods

When we make an HTTP call to a server, we specify a request method that indicates the type of operation we are about to perform. These are also called HTTP verbs.

Some common HTTP request methods correspond to the CRUD operations mentioned earlier. you may check more on MDN web documentation

Method nameOperation
GETRetrieve data (Read)
POSTSend data (Create)
PUT/PATCHUpdate data (Update)
DELETEDelete data (Delete)

Request URL

In addition to a request method, a request must include a request URL that indicates where to make the API call. A request URL has three parts:

  1. Protocol - such as http:// or https://

  2. Host - location of the server

  3. Path - route on the server

ProtocolHostPath (API endpoints)
https://www.linkedin.comin/mohd482/

Response status codes

Whenever we send any request through API, we get some status about the response we get from any server or API provider. Some of them I have explained below:-

Code rangeMeaningExample
1xxInformational100 - Continue
2xxSuccess200 - OK
3xxRedirection302 - Found
4xxClient errors400 - Bad Request
5xxServer errors500 - Internal server error

Till now you have understood what are APIs, their types, architectures how to access them and their request methods now let's understand what is Postman.

Introduction To Postman

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can easily create better APIs and consume them.

You can learn to use Postman by completing its course named Postman API Fundamentals Student Expert Certification, through this course you'll get to know how to create and use the APIs.

API Testing Tools:

  • Postman

  • Apigee

  • JMeter

  • Ping API

  • Soap UI

  • vREST

How to Create APIs?

Creating an API is easy unless you are very clear on the basic concepts. It’s an iterative process (based on feedback) that includes a few easy steps:

  • Plan your goal and the intended users

  • Design the API architecture

  • Develop (Implement the code) and Test API

  • Monitor its working and work on feedback

Conclusion:-

APIs are the foundation of modern software, enabling the sharing of resources and services across applications, organizations, and devices. APIs can be accessed through public, private, or partner APIs. Postman is an API platform that simplifies the API lifecycle and streamlines collaboration. Postman's API Fundamentals Student Expert Certification course provides a comprehensive understanding of API creation and usage.

Follow Me On Socials :

Linkedin

Twitter

Github

Like👍|Share📲|Comment💭

Did you find this article valuable?

Support MOHD NEHAL KHAN by becoming a sponsor. Any amount is appreciated!