SlideShare a Scribd company logo
The Web APIs
Ioseb Dzmanashvili
!
!
Software Architect at AzRy LLC
!
!
!
Twitter: https://twitter.com/iosebi	
Github: https://github.com/ioseb
What is Web API?
Web API is an umbrella term and means anything that
is based on core Web protocols and concepts. Namely
HTTP, URI and Media Types.
What is HTTP?
The Hypertext Transfer Protocol (HTTP) is an
application-level protocol for distributed,
collaborative, hypertext information systems.
!
Hypertext Transfer Protocol RFC, HTTPbis
HTTP Has Many Uses/Applications
•Data Transportation
•RPC(Remote Procedure Call) 
•Primitive CRUD(Create/Read/Update/Delete)
•Hypermedia Systems
•etc…
What is URI?
A Uniform Resource Identifier (URI) is a compact
sequence of characters that identifies an abstract or
physical resource.
!
Uniform Resource Identifier [RFC3986]
An application programming interface (API)
specifies how some software components should
interact with each other.
What is an API?
Data Oriented Approach
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: …
!
{
"score": 1337,
"playerName": "Sean Plott",
"cheatMode": false,
"createdAt": "2011-08-20T02:06:57.931Z",
"updatedAt": "2011-08-20T02:06:57.931Z",
"objectId": "Ed1nuqPvcm"
}
Control Oriented Approach
HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: private, max-age=0
Content-Length: ...
!
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<section>
<header>
<img src="/logo.png">
</header>
<form method="post" action="/users" enctype="...">
<label>
User name: <input type="text" name="user-name">
</label>
<button type="submit" name="create">Create</button>
</form>
</section>
</body>
</html>
Control Oriented Approach
Some Basics
<many different links>
<a href…>
<img src…>
<link href…>
<video…>
<audio…>
<form action…>
Method safe idempotent visibility cacheable
GET Yes Yes Yes Yes
HEAD Yes Yes Yes Yes
PUT Yes Yes
DELETE Yes Yes
POST(a) Partial
POST(p)
Uniform HTTP Methods
HTTP Response Codes for Dummies
Status Code Range Description
20x Cool.
30x ask that dude over there.
40x you fucked up.
50x we fucked up.
@DanaDanger
Though We Often See….
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: …
!
{"error": "Hey dude you fucked up..."}
7 Lines of Text
http://service.org/simpsons/ijk
Resource Identifier
Request Message
GET /simpsons/ijk HTTP/1.1
Host: service.org
Response Message
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
!
!
!
!
!
!
!
!
!
!
!
!
}Representation
}Interpretation
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
Link: </simpsons/ijk>; rel="self"; title=“Bart"
!
[BINARY DATA HERE]
The “self” Link Relation Type
The “self” Link Relation Type
Conveys an identifier for the link's context.
!
[RFC4287]
Bart
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
Link: </simpsons/ijk>; rel="self edit"; title=“Bart"
!
[BINARY DATA HERE]
The “edit” Link Relation Type
The “edit” Link Relation Type
Refers to a resource that can be used to
edit the link's context.
!
[RFC5023]
Bart
Bart Apply
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
Link: </simpsons/ijk>; rel="self edit"; title="Bart",
</simpsons/>; rel="collection"; title="The Simpsons”
!
[BINARY DATA HERE]
The “collection” Link Relation Type
The “collection” Link Relation Type
The target URI points to a resource which
represents the collection resource for the
context URI.
!
[RFC6573]
BartSimpsons
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
Link: </simpsons/ijk>; rel="self edit"; title="Bart",
</simpsons/>; rel="collection"; title="The Simpsons",
</simpsons/abc>; rel="prev"; type="image/gif"; title=“Homer"
!
[BINARY DATA HERE]
The “prev” Link Relation Type
The “prev” Link Relation Type
Indicates that the link's context is a part of
a series, and that the previous in the
series is the link target.
!
[HTML Spec]
Bart
Homer
Simpsons
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: ...
Link: </simpsons/ijk>; rel="self edit"; title="Bart",
</simpsons/>; rel="collection"; title="The Simpsons",
</simpsons/abc>; rel="prev"; type="image/gif"; title="Homer",
</simpsons/xyz>; rel="next"; type="image/png"; title=“Marge"
!
[BINARY DATA HERE]
The “next” Link Relation Type
The “next” Link Relation Type
Indicates that the link's context is a part of
a series, and that the next in the series is
the link target.
!
[HTML Spec]
Bart
Homer Marge
Simpsons
Control Oriented Approach
An affordance is a relationship between the
properties of an object and the capabilities of the
agent that determine just how the object could
possibly be used.
…
Think of each action by the user as an attempt to step in
the right direction; an error is simply an action that is
incompletely or improperly specified. Try support, not to
fight, the user's responses. Design explorable systems.
!
Don Norman
When I say hypertext, I mean the simultaneous
presentation of information and controls
such that the information becomes the
affordance through which the user (or automaton)
obtains choices and selects actions
!
Roy T. Fielding 2008
Questions?

More Related Content

PPTX
Rest and Rails
PPTX
RESTful API Design Fundamentals
PPTX
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRIS
PDF
HATEOAS: The Confusing Bit from REST
PPT
Rest in Rails
PPTX
Web Architecture - Mechanism and Threats
PPTX
Design Beautiful REST + JSON APIs
ODP
RESTful Web Services
Rest and Rails
RESTful API Design Fundamentals
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRIS
HATEOAS: The Confusing Bit from REST
Rest in Rails
Web Architecture - Mechanism and Threats
Design Beautiful REST + JSON APIs
RESTful Web Services

What's hot (20)

KEY
Rest and the hypermedia constraint
PDF
ReST (Representational State Transfer) Explained
PDF
REST - Representational State Transfer
PDF
Representational State Transfer (REST) and HATEOAS
PDF
The never-ending REST API design debate -- Devoxx France 2016
PPT
The Rest Architectural Style
PPTX
Creating Truly RESTful APIs
PDF
Resource-Oriented Architecture (ROA) and REST
PDF
Together Cheerfully to Walk with Hypermedia
PPTX
Best practices for RESTful web service design
PDF
Representational State Transfer (REST)
PDF
Best Practices in Web Service Design
PDF
Resource Oriented Architectures
PPT
External Data Access with jQuery
PPTX
JSON and REST
PPT
REST Presentation
PPT
Busy Architects Guide to Modern Web Architecture in 2014
PPTX
Spring HATEOAS
PDF
REST - Representational state transfer
PPTX
REST API Design
Rest and the hypermedia constraint
ReST (Representational State Transfer) Explained
REST - Representational State Transfer
Representational State Transfer (REST) and HATEOAS
The never-ending REST API design debate -- Devoxx France 2016
The Rest Architectural Style
Creating Truly RESTful APIs
Resource-Oriented Architecture (ROA) and REST
Together Cheerfully to Walk with Hypermedia
Best practices for RESTful web service design
Representational State Transfer (REST)
Best Practices in Web Service Design
Resource Oriented Architectures
External Data Access with jQuery
JSON and REST
REST Presentation
Busy Architects Guide to Modern Web Architecture in 2014
Spring HATEOAS
REST - Representational state transfer
REST API Design
Ad

Similar to იოსებ ძმანაშვილი - The Web APIs (20)

PDF
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
PPTX
Representational State Transfer
PDF
Hypermedia APIs and HATEOAS / Wix Engineering
PPTX
ASP.NET Mvc 4 web api
PDF
Hypermedia APIs and HATEOAS
KEY
A Conversation About REST - Extended Version
KEY
REST and the Hypermedia Constraint
PDF
Hypermedia APIs - GeekOut
KEY
A Conversation About REST
KEY
A Conversation About REST
PDF
Demystifying the REST API
PPTX
PPTX
Introduction to Web Services
PPTX
RESTful APIs
PPTX
rest-api-basics.pptx
PPTX
Tutorial_Rest_API_For_Beginners_125.pptx
PDF
Introduction to REST and Jersey
PPTX
Rest APIs Training
PDF
REST in AEM by Roy Fielding
PDF
REST in AEM
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Representational State Transfer
Hypermedia APIs and HATEOAS / Wix Engineering
ASP.NET Mvc 4 web api
Hypermedia APIs and HATEOAS
A Conversation About REST - Extended Version
REST and the Hypermedia Constraint
Hypermedia APIs - GeekOut
A Conversation About REST
A Conversation About REST
Demystifying the REST API
Introduction to Web Services
RESTful APIs
rest-api-basics.pptx
Tutorial_Rest_API_For_Beginners_125.pptx
Introduction to REST and Jersey
Rest APIs Training
REST in AEM by Roy Fielding
REST in AEM
Ad

More from unihack (6)

PPTX
შოთა გიორგობიანი - More than Code
PPTX
როგორ ვერ გავხდი $მილიონერი$
PDF
Hack@macs 2014 test driven development & pair programing
PPTX
ალექსანდრე ნემსაძე - Release it
PPTX
შოთა გიორგობიანი It's all about having fun
PDF
იოსებ ძმანაშვილი Node.js
შოთა გიორგობიანი - More than Code
როგორ ვერ გავხდი $მილიონერი$
Hack@macs 2014 test driven development & pair programing
ალექსანდრე ნემსაძე - Release it
შოთა გიორგობიანი It's all about having fun
იოსებ ძმანაშვილი Node.js

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf

იოსებ ძმანაშვილი - The Web APIs

  • 2. Ioseb Dzmanashvili ! ! Software Architect at AzRy LLC ! ! ! Twitter: https://twitter.com/iosebi Github: https://github.com/ioseb
  • 3. What is Web API? Web API is an umbrella term and means anything that is based on core Web protocols and concepts. Namely HTTP, URI and Media Types.
  • 4. What is HTTP? The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. ! Hypertext Transfer Protocol RFC, HTTPbis
  • 5. HTTP Has Many Uses/Applications •Data Transportation •RPC(Remote Procedure Call) •Primitive CRUD(Create/Read/Update/Delete) •Hypermedia Systems •etc…
  • 6. What is URI? A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. ! Uniform Resource Identifier [RFC3986]
  • 7. An application programming interface (API) specifies how some software components should interact with each other. What is an API?
  • 8. Data Oriented Approach HTTP/1.1 200 OK Content-Type: application/json Content-Length: … ! { "score": 1337, "playerName": "Sean Plott", "cheatMode": false, "createdAt": "2011-08-20T02:06:57.931Z", "updatedAt": "2011-08-20T02:06:57.931Z", "objectId": "Ed1nuqPvcm" }
  • 9. Control Oriented Approach HTTP/1.1 200 OK Content-Type: text/html Cache-Control: private, max-age=0 Content-Length: ... ! <!DOCTYPE html> <html> <head> <title>Hello World</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <section> <header> <img src="/logo.png"> </header> <form method="post" action="/users" enctype="..."> <label> User name: <input type="text" name="user-name"> </label> <button type="submit" name="create">Create</button> </form> </section> </body> </html>
  • 12. <many different links> <a href…> <img src…> <link href…> <video…> <audio…> <form action…>
  • 13. Method safe idempotent visibility cacheable GET Yes Yes Yes Yes HEAD Yes Yes Yes Yes PUT Yes Yes DELETE Yes Yes POST(a) Partial POST(p) Uniform HTTP Methods
  • 14. HTTP Response Codes for Dummies Status Code Range Description 20x Cool. 30x ask that dude over there. 40x you fucked up. 50x we fucked up. @DanaDanger
  • 15. Though We Often See…. HTTP/1.1 200 OK Content-Type: application/json Content-Length: … ! {"error": "Hey dude you fucked up..."}
  • 16. 7 Lines of Text
  • 18. Request Message GET /simpsons/ijk HTTP/1.1 Host: service.org
  • 19. Response Message HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... ! ! ! ! ! ! ! ! ! ! ! ! }Representation
  • 21. HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... Link: </simpsons/ijk>; rel="self"; title=“Bart" ! [BINARY DATA HERE] The “self” Link Relation Type
  • 22. The “self” Link Relation Type Conveys an identifier for the link's context. ! [RFC4287]
  • 23. Bart
  • 24. HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... Link: </simpsons/ijk>; rel="self edit"; title=“Bart" ! [BINARY DATA HERE] The “edit” Link Relation Type
  • 25. The “edit” Link Relation Type Refers to a resource that can be used to edit the link's context. ! [RFC5023]
  • 26. Bart
  • 28. HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... Link: </simpsons/ijk>; rel="self edit"; title="Bart", </simpsons/>; rel="collection"; title="The Simpsons” ! [BINARY DATA HERE] The “collection” Link Relation Type
  • 29. The “collection” Link Relation Type The target URI points to a resource which represents the collection resource for the context URI. ! [RFC6573]
  • 31. HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... Link: </simpsons/ijk>; rel="self edit"; title="Bart", </simpsons/>; rel="collection"; title="The Simpsons", </simpsons/abc>; rel="prev"; type="image/gif"; title=“Homer" ! [BINARY DATA HERE] The “prev” Link Relation Type
  • 32. The “prev” Link Relation Type Indicates that the link's context is a part of a series, and that the previous in the series is the link target. ! [HTML Spec]
  • 34. HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: ... Link: </simpsons/ijk>; rel="self edit"; title="Bart", </simpsons/>; rel="collection"; title="The Simpsons", </simpsons/abc>; rel="prev"; type="image/gif"; title="Homer", </simpsons/xyz>; rel="next"; type="image/png"; title=“Marge" ! [BINARY DATA HERE] The “next” Link Relation Type
  • 35. The “next” Link Relation Type Indicates that the link's context is a part of a series, and that the next in the series is the link target. ! [HTML Spec]
  • 38. An affordance is a relationship between the properties of an object and the capabilities of the agent that determine just how the object could possibly be used. … Think of each action by the user as an attempt to step in the right direction; an error is simply an action that is incompletely or improperly specified. Try support, not to fight, the user's responses. Design explorable systems. ! Don Norman
  • 39. When I say hypertext, I mean the simultaneous presentation of information and controls such that the information becomes the affordance through which the user (or automaton) obtains choices and selects actions ! Roy T. Fielding 2008