SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
API Design & Devp with AT
What is an API
Similarly, an API lists a bunch of
operations that developers can use,
along with a description of what they
do.
How an API works
API protocols and Architecture
SOAP
XML used as data format,
- Too verbose on client and
server side
- Still used by banks and
Telcos
REST
GraphQL
HTTP Basics
Anatomy of an HTTP Request
- The version of the HTTP protocol.
- Optional headers that convey additional information
for the servers.
- Body, for some methods like POST, similar to those in
responses, which contain the resource sent.
Anatomy of an HTTP Response
- HTTP version protocol they follow.
- Status code indicating if the
request has been successful, or
not, and why.
- Status message a
non-authoritative short description
of the status code.
- HTTP headers like those for
requests.
- Optionally a body containing the
fetched resource.
Representing Data: REST Data formats
curl -i -u application_name:application_password
--data '{"password": "my_password"}'
http://localhost/myapi/1/auth?username=my_usernam
e --header 'Content-Type: application/json'
--header 'Accept: application/json'
API Authentication
- There are three common API
authentication schemes;
- Basic Auth
- API keys
- OAuth
Authentication: Basic Authentication
- Basic Auth only requires a
username and password.
- Passed on via Authorization
HTTP header
- Server returns http code 401 to let
client know authorization failed
API Key Authentication
- key is usually a long series of letters
and numbers that is distinct from the
account owner's login password
- keys are used simply so the user
does not have to give out their
password
- You can put the key in the
Authorization header or add the key
onto the URL
(http://example.com?api_key=my_se
cret_key)
Open Authorization (OAuth)
- Automates key exchange by providing a
standard way for the client to get a key from
server through walking user via simple steps.
- OAuth 2 involves;
- User: Person who wants to connect two
websites they use
- Client: Website that will be granted
access to the user's data
- Server: website that has the user's
data
API design basics
- Resources are the nouns of APIs
- Key pointers;
- Decide what resource(s) need to be
available.
- Assign URLs to those resources.
- Decide what actions the client should
be allowed to perform on those
resources.
- Figure out what pieces of data are
required for each action and what
format they should be in.
Example Rest API actions & url endpoints
API Development & testing tools
Try out Africa’s Talking APIs
Thank You
David Okwii,
Developer relations, Africa’s talking
dokwi@africastalking.com
@oquidave on Twitter
More cool Resources:
● Api security checklist
https://github.com/shieldfy/API-Security-Checklist
● API best practices:
https://www.vinaysahni.com/best-practices-for-a-prag
matic-restful-api
● Mozilla:
https://developer.mozilla.org/en-US/docs/Web/HTTP/
Overview
● Zapier: https://zapier.com/learn/apis/

More Related Content

What's hot (20)

PPTX
REST & RESTful Web Services
Halil Burak Cetinkaya
 
DOCX
Bt0083, server side programming theory
smumbahelp
 
PPT
The Rest Architectural Style
Robert Wilson
 
PPTX
Overview of RESTful web services
nbuddharaju
 
PPT
Site opsys
Thomas George
 
PPTX
Rest WebAPI with OData
Mahek Merchant
 
PPT
SQL Injection Attacks
Compare Infobase Limited
 
PPTX
JSON and REST
Robert MacLean
 
PPTX
REST and RESTful Web Services
Kasun Madusanke
 
PPT
gofortution
gofortution
 
PDF
REST - Representational State Transfer
Peter R. Egli
 
PPTX
Top open source tools to consider for web service performance testing
Alisha Henderson
 
PPTX
Intro to flask2
Mohamed Essam
 
PDF
Representational State Transfer (REST)
Abhay Ananda Shukla
 
PPT
Web crawler
anusha kurapati
 
PPTX
Day01 api
ABDEL RAHMAN KARIM
 
PPTX
Rest api-basic
Amila Sampath
 
PPTX
Cors (cross origin request sharing) in mule
Ankit Lawaniya
 
PPTX
Restful api
Anurag Srivastava
 
PPTX
Learn How To Use CA PPM REST API in 2 minutes!
Prominder Nayar
 
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Bt0083, server side programming theory
smumbahelp
 
The Rest Architectural Style
Robert Wilson
 
Overview of RESTful web services
nbuddharaju
 
Site opsys
Thomas George
 
Rest WebAPI with OData
Mahek Merchant
 
SQL Injection Attacks
Compare Infobase Limited
 
JSON and REST
Robert MacLean
 
REST and RESTful Web Services
Kasun Madusanke
 
gofortution
gofortution
 
REST - Representational State Transfer
Peter R. Egli
 
Top open source tools to consider for web service performance testing
Alisha Henderson
 
Intro to flask2
Mohamed Essam
 
Representational State Transfer (REST)
Abhay Ananda Shukla
 
Web crawler
anusha kurapati
 
Rest api-basic
Amila Sampath
 
Cors (cross origin request sharing) in mule
Ankit Lawaniya
 
Restful api
Anurag Srivastava
 
Learn How To Use CA PPM REST API in 2 minutes!
Prominder Nayar
 

Similar to Api design and development (20)

PPTX
Api crash
Hoang Nguyen
 
PPTX
Api crash
Luis Goldster
 
PPTX
Api crash
Harry Potter
 
PPTX
Api crash
Fraboni Ec
 
PPTX
Api crash
Tony Nguyen
 
PPTX
Api crash
Young Alista
 
PPTX
Api crash
James Wong
 
PDF
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
Techugo Inc
 
PPTX
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
PPTX
Understanding APIs.pptx introduction chk
nooreen nayyar syeda
 
PPTX
How to build Simple yet powerful API.pptx
Channa Ly
 
PDF
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Techugo
 
PDF
Guide To API Development.pdf
Techugo
 
PDF
What are ap is, how do they work, and why are they beneficial to developers a...
Shelly Megan
 
PDF
A_Complete_Guide_to_API_Development.pdf
PamRobert
 
PDF
Design Web Api
Tailor Fontela
 
PDF
What is API - Understanding API Simplified
Jubin Aghara
 
PDF
DFY Suite
yahiaaymen181
 
PDF
Modern APIs: The Non-Technical User’s Guide | The Enterprise World
Enterprise world
 
PPTX
REST-API introduction for developers
Patrick Savalle
 
Api crash
Hoang Nguyen
 
Api crash
Luis Goldster
 
Api crash
Harry Potter
 
Api crash
Fraboni Ec
 
Api crash
Tony Nguyen
 
Api crash
Young Alista
 
Api crash
James Wong
 
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
Techugo Inc
 
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
Understanding APIs.pptx introduction chk
nooreen nayyar syeda
 
How to build Simple yet powerful API.pptx
Channa Ly
 
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Techugo
 
Guide To API Development.pdf
Techugo
 
What are ap is, how do they work, and why are they beneficial to developers a...
Shelly Megan
 
A_Complete_Guide_to_API_Development.pdf
PamRobert
 
Design Web Api
Tailor Fontela
 
What is API - Understanding API Simplified
Jubin Aghara
 
DFY Suite
yahiaaymen181
 
Modern APIs: The Non-Technical User’s Guide | The Enterprise World
Enterprise world
 
REST-API introduction for developers
Patrick Savalle
 
Ad

Recently uploaded (20)

PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Ad

Api design and development

  • 1. API Design & Devp with AT
  • 2. What is an API Similarly, an API lists a bunch of operations that developers can use, along with a description of what they do.
  • 3. How an API works
  • 4. API protocols and Architecture
  • 5. SOAP XML used as data format, - Too verbose on client and server side - Still used by banks and Telcos
  • 9. Anatomy of an HTTP Request - The version of the HTTP protocol. - Optional headers that convey additional information for the servers. - Body, for some methods like POST, similar to those in responses, which contain the resource sent.
  • 10. Anatomy of an HTTP Response - HTTP version protocol they follow. - Status code indicating if the request has been successful, or not, and why. - Status message a non-authoritative short description of the status code. - HTTP headers like those for requests. - Optionally a body containing the fetched resource.
  • 11. Representing Data: REST Data formats curl -i -u application_name:application_password --data '{"password": "my_password"}' http://localhost/myapi/1/auth?username=my_usernam e --header 'Content-Type: application/json' --header 'Accept: application/json'
  • 12. API Authentication - There are three common API authentication schemes; - Basic Auth - API keys - OAuth
  • 13. Authentication: Basic Authentication - Basic Auth only requires a username and password. - Passed on via Authorization HTTP header - Server returns http code 401 to let client know authorization failed
  • 14. API Key Authentication - key is usually a long series of letters and numbers that is distinct from the account owner's login password - keys are used simply so the user does not have to give out their password - You can put the key in the Authorization header or add the key onto the URL (http://example.com?api_key=my_se cret_key)
  • 15. Open Authorization (OAuth) - Automates key exchange by providing a standard way for the client to get a key from server through walking user via simple steps. - OAuth 2 involves; - User: Person who wants to connect two websites they use - Client: Website that will be granted access to the user's data - Server: website that has the user's data
  • 16. API design basics - Resources are the nouns of APIs - Key pointers; - Decide what resource(s) need to be available. - Assign URLs to those resources. - Decide what actions the client should be allowed to perform on those resources. - Figure out what pieces of data are required for each action and what format they should be in.
  • 17. Example Rest API actions & url endpoints
  • 18. API Development & testing tools
  • 19. Try out Africa’s Talking APIs
  • 20. Thank You David Okwii, Developer relations, Africa’s talking [email protected] @oquidave on Twitter More cool Resources: ● Api security checklist https://github.com/shieldfy/API-Security-Checklist ● API best practices: https://www.vinaysahni.com/best-practices-for-a-prag matic-restful-api ● Mozilla: https://developer.mozilla.org/en-US/docs/Web/HTTP/ Overview ● Zapier: https://zapier.com/learn/apis/