SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Goals
â–ȘUnderstand REST
â–ȘWhat
â–ȘWhy
â–ȘGet comfortable with ASP.NET Web API
10/8/2013 1
Agenda
â–ȘQuick Demo
â–ȘREST and Why You Should Care
â–ȘBuilding an API with ASP.NET Web API
10/8/2013 2
What is REST
â–ȘStands For:
â–ȘREpresentational State Transfer
â–ȘArchitectural Style based on HTTP
10/8/2013 3
What is HTTP?
â–ȘWell defined protocol (web browsers, web servers, etc.)
â–ȘRequest and Response
â–ȘStateless
â–ȘRequest Contents
â–ȘURL
â–ȘHTTP Verb
â–ȘHeader
â–ȘMessage Body
10/8/2013 4
What is REST
â–ȘArchitectural Style based on HTTP
â–ȘResources (Things)
â–ȘVerbs (Actions)
â–ȘGET, POST, PUT, DELETE, etc.
â–ȘResponse gives a representation of the resource (XML, JSON,
image, etc.)
More Info: http://en.wikipedia.org/wiki/REST
10/8/2013 5
Resources
â–ȘGET http://en.gravatar.
com/userimage/7361283/02c115a8f3967a.jpg
â–ȘGET https://www.diigo.com/user/jfjcn1/webApi
10/8/2013 6
HTTP Verbs
â–ȘGET
â–ȘGets 0 or more of a resource (thing)
â–ȘPOST
â–ȘCreates a resource (hopefully)
â–ȘPUT
â–ȘUpdates a resource (hopefully)
â–ȘDELETE
â–ȘDeletes a resource (hopefully)
10/8/2013 7
REST in Action
Actions:
â–Ș GET
â–Ș POST
â–Ș PUT
â–Ș DELETE
Resources:
â–Ș http://somedomain.com/users/1
â–Ș https://otherdomain.com/products
10/8/2013 8
REST Responses
â–ȘResponses come back as an HTTP Status Code + message (maybe)
â–ȘHTTP Status Codes
â–Ș1XX – Request Received and I’m processing it
â–Ș2XX – Request Received and processed it successfully!
â–Ș3XX – Client must do something else to complete the request
â–Ș4XX – Client made an error
â–Ș5XX – Server error
10/8/2013 9
Popular Status Codes
â–Ș200 – Success
â–Ș201 – Created
â–Ș301 – Moved Permanently (AKA “redirect”)
â–Ș404 – Not Found
â–Ș401 – Unauthorized
â–Ș500 – Internal Server Error (AKA “oh crap!”)
10/8/2013 10
On to the codez

10/8/2013 11
Why REST?
â–ȘEveryone/everything speaks HTTP
â–ȘWeb applications are moving to JavaScript + AJAX
â–ȘLightweight compared to SOAP
â–ȘCaching of resources (server decides)
â–Șhttp://en.gravatar.com/userimage/7361283/02c115a8f3967a.jpg
10/8/2013 12
REST is NOT a standard
10/8/2013 13
Thank You!
fernando@TalentRiot.com
http://kaizencto.com
@avfernando
10/8/2013 14

Mais conteĂșdo relacionado

Semelhante a How to build a rest api.pptx

RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
Li Yi
 
RESTful services
RESTful servicesRESTful services
RESTful services
gouthamrv
 
2010 code camp rest for the rest of us
2010 code camp   rest for the rest of us2010 code camp   rest for the rest of us
2010 code camp rest for the rest of us
Ken Yagen
 
Restful web services rule financial
Restful web services   rule financialRestful web services   rule financial
Restful web services rule financial
Rule_Financial
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
deimos
 

Semelhante a How to build a rest api.pptx (20)

RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
RESTful SOA - äž­ç§‘é™ąæš‘æœŸèźČćș§
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with OData
 
There is time for rest
There is time for rest There is time for rest
There is time for rest
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick Intro
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel Mardjan
 
KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7
 
Node js crash course session 2
Node js crash course   session 2Node js crash course   session 2
Node js crash course session 2
 
WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
 
2010 code camp rest for the rest of us
2010 code camp   rest for the rest of us2010 code camp   rest for the rest of us
2010 code camp rest for the rest of us
 
Restful web services rule financial
Restful web services   rule financialRestful web services   rule financial
Restful web services rule financial
 
Wp JSON API and You!
Wp JSON API and You!Wp JSON API and You!
Wp JSON API and You!
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
 
01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
RESTful application with Drupal 8
RESTful application with Drupal 8RESTful application with Drupal 8
RESTful application with Drupal 8
 
HTTP Basic - PHP
HTTP Basic - PHPHTTP Basic - PHP
HTTP Basic - PHP
 

Mais de Harry Potter

Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
Harry Potter
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
Harry Potter
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
Harry Potter
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
Harry Potter
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
Harry Potter
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
Harry Potter
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
Harry Potter
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
Harry Potter
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
Harry Potter
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
Harry Potter
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
Harry Potter
 
Encapsulation anonymous class
Encapsulation anonymous classEncapsulation anonymous class
Encapsulation anonymous class
Harry Potter
 
Abstract class
Abstract classAbstract class
Abstract class
Harry Potter
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
Harry Potter
 
Rest api to integrate with your site
Rest api to integrate with your siteRest api to integrate with your site
Rest api to integrate with your site
Harry Potter
 

Mais de Harry Potter (20)

Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
 
Cache recap
Cache recapCache recap
Cache recap
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
Smm & caching
Smm & cachingSmm & caching
Smm & caching
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
 
Object model
Object modelObject model
Object model
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
 
Encapsulation anonymous class
Encapsulation anonymous classEncapsulation anonymous class
Encapsulation anonymous class
 
Abstract class
Abstract classAbstract class
Abstract class
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Api crash
Api crashApi crash
Api crash
 
Rest api to integrate with your site
Rest api to integrate with your siteRest api to integrate with your site
Rest api to integrate with your site
 
Inheritance
InheritanceInheritance
Inheritance
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

How to build a rest api.pptx