0% found this document useful (0 votes)
19 views

APIs - Application Programming Interfaces

Uploaded by

kmvinay.tech
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

APIs - Application Programming Interfaces

Uploaded by

kmvinay.tech
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Understanding

[APIs]
🗒 Agenda

1 Introduction to APIs 2 Deep Dive into APIs 3 API Product Management

→ What are APIs → Request & Response → What do API PMs do


→ Popular APIs → Payload & Endpoints → Resources
→ API use cases → Status & Body
→ Linkedin API
CAB TRAVEL/UBER FIN TECH/CRED BOOKING/PAYTM

PAYTM
[A]pplication [P]rogramming [I]nterface

APIs are the way for tech


systems to communicate
with each other
How are APIs useful?

1 Complete the functionality of the product.


Eg: Booking.com, UBER, CRED.

2 Communicate with internal systems.


Eg: Front-end ⟺ Backend

3 Offer your own API as a business.


Eg: Stripe, Google Maps, National Stock Exchange
IndiGO

SpiceJet

Lufthansa Booking.com

Airlines…
Front-end API Back-end
API as a business
[A]pplication [P]rogramming [I]nterface

APIs are the way for tech


systems to communicate
with each other
APIs

PROs CONs

- Reduce time to ship - Added cost


- Added functionality - Dependency
- Standardization
🛠 How API works
Request

EndPoint: server_location_url
Type: POST | GET | PUT | DELETE
Header: Authorization
Payload/Data: {}

API API
Consumer Provider
Response

Status: Success | Error


Content/Message: {}
JSON

JSON stands for JavaScript Object Notation.

It's a lightweight format for storing and transporting data and is often used when data
is sent from a server to a web page.

JSON is "self-describing" and easy to understand

{
"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"}
]
}
Terminology related to APIs

Endpoints, Request & Response

Request:

- Type:

- POST: Add a resource

- PUT: Edit a resource

- DELETE: Delete a resource

- GET: Get a resource

- Headers:

- Authentication, Key and Secrets

- Payload:

- JSON, XML
Terminology related to APIs

Response

- Headers:

- Status:

- 2XX: Success

- 5XX: Error at server

- 4XX: Error at client

- 3XX: Resource has been displaced

- Body:

- JSON or XML
Creating Linkedin API
Linkedin’s Internal APIs

1. Create user
2. Edit profile
3. Show all requests
4. Create post
5. Delete post
Create user
request response

End point: Body:


api.linkedin.com/create_user {user_id: 123}

Payload: Status: 200


{
name: “Ankit Shukla”,
email: “[email protected]
}

Method: POST
Create user
Edit profile
Edit profile
request response

End point:
Body:
api.linkedin.com/edit_user
{name: “Ankit Kumar Shukla”}

Header:
Status:
Authentication_code:
{Status: 200}

Payload:
{
name: “Ankit Kumar Shukla”,
user_id: “”
}

Method: PUT
Show all connection requests
Show all connection requests
request response

End point: Body:


api.linkedin.com/connections_r List: {
{user_id, profile_pic, name, account_link},
Authorization: {user_id, profile_pic, name, account_link}
{user_id, profile_pic, name, account_link}
Payload: }
{ “User_id”:
“count”:}
Status: 200
Method: GET
Create Post
Create Post
request response

End point: Body:


api.linkedin.com/create_post

Payload:
{ Status:
“Post_text”:
“user_id”:
}

Method: POST
Delete Post
Delete Post
request response

End point:
Body:
api.linkedin.com/delete_post

Authorization:

Payload:
{ Status:
Post_id: ‘’,
}

Method: DELETE
Responsibilities as an API product manager

1 Valuable

2 Usable

3 Feasible

4 Viable
Responsibilities as an API product manager

1 Valuable: Consumer Needs

2 Usable: Documentation & Ease of use.

3 Feasible: SDLC & Developer Empathy. Performance, Scalability, Security.

4 Viable: Business Objectives


Valuable

As a developer working at Notion


I want to use chatGPT API
So that my users can auto-generate content

As a developer working at Alexa


I want to use chatGPT API Jobs to be done
So that my users can get almost real life answers from their voice commands

As a Indie developer
I want to use chatGPT API
So that I can create a chatbot business
Usable
Feasible

→ Application of Large Language Model


→ Scalability
→ Performance
→ Security
→ Managing SDLC
→ Leading Experimentation
Viable

→ Is the cost of running the model viable with pricing?


→ Do we have a distribution model?
→ Does the partnership with Microsoft in-sync for free-api access
Resources for APIs

→ Tinker with APIs:


https://jsonplaceholder.typicode.com/

→ List of interesting APIs:


https://apilist.fun/

→ Learn to use Postman to use APIs


https://learning.postman.com/

→ Interesting projects build on OpenAIs API


https://daily.net/cool-chatgpt-projects/

You might also like