What is an API and it's advantages and make a pdf

shiva951908 0 views 13 slides Oct 31, 2025
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Remove last 2 pages from slide and add thank you page


Slide Content

What is an API?

The Building Blocks of Modern Software

What is an API? (The Analogy)

|; = Think of it as a waiter.
f > You (the application) tell the waiter (API) what you want.
» + —o—,
The waiter goes to the kitchen (server/database) to get it.
m Finally, the waiter brings the food (data) back to you.
==
.

How APIs Work (The 3-Step Process)

a

1. Request

Your application asks for data or
to perform an action.

dy
2. Processing

The API receives the request and
processes it (e.g. gets data from
a database).

[a]

3. Response

The API sends back the result
(the data or a confirmation) to
your application.

Types of APIs (Web APIs)

pas

REST

Representational State Transfer.
The most common type, uses
standard HTTP methods. Flexible
and lightweight.

SOAP

Simple Object Access Protocol

XML-based, very structured and

secure. Often used in enterprise
systems.

Q

GraphQL

‘A query language for APIs. Lets
the client ask for exactly what it
needs and nothing more.

Types of APIs (Other Categories)

Library/Framework APIs: Used to interact with a software library. (e.g.. The Python ‘requests
y y (eg. vf is)
library, Java API).

@ Operating System APIs: Allows applications to interact with the computers OS (e.g. Windows
API, POSIX for Linux/macOS)

Database APIs: Provides a standard way to connect and run queries on a database (e.g., JDBC,
y 9.
ODBC).

Focus: REST API Basics (HTTP Verbs)

O
GET

Retrieve data from the server.

POST

Create new data on the server.

O

O
PUT

Update existing data on the server.

DELETE

Remove data from the server.

O

Using a Weather App
1 App sends a GET request to a weather API
2. The API fetches the latest data from its weather database.

3. The API returns the data (as JSON) like temperature and
humidity.

4. The App displays the information to you in a friendly way.

Common Response Format: JSON

What is JSON?
Stands for JavaScript Object Notation

Its a lightweight, human-readable format for exchanging
data

It's the most common format used by modern REST APIs.

{ "user
"B.Tech CSE" )

"John",

"age": 20,

"course":

Why Do APIs Matter?

Sy #

Interoperability Efficiency
Enable different Allow developers to
systems to work use existing services

together and share (Google Maps,

data Payments)

Scalability

Support mobile apps,

web apps, and loT
devices from one
backend,

&

Architecture

Enable modern
microservices, where
‘apps are built of
small, connected
services.

Simple Example in Python

Making an API Call

# Import the library import requests # Making the

API call response =

This example uses the popular * requests” library in Python. requests.get('https://api.example.com/users') # Get
data from the JSON response data = response. json()

a ie # Print the data print(data)
It makes a ‘GET’ request to a placeholder API A

It then parses the JSON response and prints the data.

The Big Picture

APIs are fundamental to modern software
development, making it possible to build
complex applications by connecting various
services together!

Questions?

Thank You

Image Sources

+ _hitpsi/stote vecteezy com/system/resources/previews/025/255/757/non_2x/abstract-connecting-ines-ond-dots-fo-digtal-data-vsuolzaten-network-connection-and-internet=
‘communcation-technology-background-lustration-vecter jpg

a 4 Source: wwwvecteezycom

Hips/imeomedum com zetd44hybuuMSbz$2\UvOprg
Source: uxdesign ce
Tags