SlideShare a Scribd company logo
1 of 48
Download to read offline
Hands-on https://www.getpostman.com/collections/8bfc64a96cffc06b9a95
#InternetOfThings
#OpenInnovation
#MultiPlatform
#Omminichannel
/pedidos
/pedidos/{id}
/getAccount
/getAllAccounts
/createDirectory
/updateGroupName
/findClientById
https://api.mycompany.com/name-of-api/resource
/pedidos
/pedidos/3747
GET /vendas/pedidos
GET /checklist/item/4
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
POST /clientes/98W33GJ201/enderecos
{
"endereco": "Av. Brigadeiro Faria Lima",
"numero": "3800",
"complemento": "18o. Andar",
"bairro": "Itaim Bibi",
"cidade": "São Paulo",
"estado": "SP",
"cep": "04538-132"
}
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
PUT /clientes/98W33GJ201/enderecos/1
{
"endereco": "Av. Brigadeiro Faria Lima",
"numero": "3800",
"complemento": "18o. Andar",
"bairro": "Itaim Bibi",
"cidade": "São Paulo",
"estado": "SP",
"cep": "04538-132"
}
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
DELETE /pedidos/98W33GJ201
DELETE /users/98S7726QV1/photos
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
PATCH /users/98W33GJ201
{
"email": "joao.silva@empresa.com"
}
PATCH /pedidos/39D0091B86
{
"status": "Cancelado"
}
GET
POST
PUT
DELETE
PATCH
OPTIONS
HEAD
OPTIONS /clientes
Allow: HEAD,GET,POST,OPTIONS
HEAD /clientes
Date: …
Content-Type: application/json
Content-Length: 12345
Documentação
v1
v2
v3
v4
https://api.mycompany.com/name-of-api/v2/resource
•
•
Versionamento
Nunca quebre o cliente!!
200
400
500
201
202
401
405
413
429
503
Status Code
OK 200
200
400
500
GET /candidatos?estado=SP&partido=PP
200 OK
[
{
"id": "1532962",
"apelido": "PAULO MALUF",
"nome": "PAULO SALIM MALUF",
"numero": "1111",
"cargo": "Deputado Federal",
"estado": "SP",
"partido": "PP",
"reeleicao": true
}
]
200
400
500
POST /items/1234/bids
{
"amount" : 602.99
}
201 Created
Location: /items/1234/bids/100001
{
"amount" : 602.99,
"current_bid" : 510,
"winning" : true
}
200
400
500
GET /candidatos
400 Bad Request
{
"status" : 400,
"code" : 40377,
"message" : "Parâmetro 'estado' não
pode ser nulo ou vazio"
"more" : https://dev.empresa.com/errors/40377
}
200
400
500
401
403
404
413
429
200
400
500
PUT /vendas/v1/pedidos/9940382
{
”status" : canceled
}
500 Internal Server Error
{
"status" : 500,
"message": ”Oops. Algo saiu errado”
}
GET /vendas/v2/pedidos?status=concluido
GET /pedidos/123AF15J?_fields=numero,data,valor
GET /search?q=macbook+air
GET /pedidos?_offset=50&_limit=25
http://martinfowler.com/articles/richardsonMaturityModel.html
Hypermedia
GET /items?q=macbook+air+new
{
"results" : [
{
"id" : 123,
"name" : "Macbook Air 2010 LIKE NEW",
"price" : "499"
}
]
}
GET /items?q=macbook+air+new
{
"results" : [
{
"_links" : [
{"rel": "self","uri": "/items/123" },
{"rel": "bids","uri": "/items/123/bids" },
{"rel": "win","uri": "/items/123/bids?q=win" }
],
"name" : "Macbook Air 2010 LIKE NEW",
"price" : "499"
}
]
}
● Políticas de Rate Limiting / Throttling
● JSON / XML Threat Protection
● Limites de tamanho de Payload
● IP Filtering (Blacklists e Whitelists)
User
Client
Server
Uma pessoa usando um
serviço. Se chama
“resource owner”
Uma app usada para acessar
o serviço. Se chama de
“consumer”.
É onde o serviço está
rodando. Se chama de
“service provider”.
Web access
API access
OAuth
Protocol
APIs Restfull
APIs Restfull
APIs Restfull

More Related Content

Similar to APIs Restfull

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)James Titcumb
 
Digital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachDigital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachZero Science Lab
 
strider-portofoilo
strider-portofoilostrider-portofoilo
strider-portofoiloTushar R
 
The Attack Landscape of 2020 – What to look out for and how to protect yourse...
The Attack Landscape of 2020 – What to look out for and how to protect yourse...The Attack Landscape of 2020 – What to look out for and how to protect yourse...
The Attack Landscape of 2020 – What to look out for and how to protect yourse...PascalSchulz
 
第四回月次セミナー(公開版)
第四回月次セミナー(公開版)第四回月次セミナー(公開版)
第四回月次セミナー(公開版)moai kids
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesNCCOMMS
 
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.Meet Magento Italy
 
Candies for everybody - Meet Magento Italia 2015
Candies for everybody - Meet Magento Italia 2015Candies for everybody - Meet Magento Italia 2015
Candies for everybody - Meet Magento Italia 2015Alberto López Martín
 
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPPHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPiMasters
 
BSSML17 - API and WhizzML
BSSML17 - API and WhizzMLBSSML17 - API and WhizzML
BSSML17 - API and WhizzMLBigML, Inc
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterStraight North
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsPete DuMelle
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCPPete DuMelle
 

Similar to APIs Restfull (14)

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
 
Digital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachDigital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's Outreach
 
strider-portofoilo
strider-portofoilostrider-portofoilo
strider-portofoilo
 
The Attack Landscape of 2020 – What to look out for and how to protect yourse...
The Attack Landscape of 2020 – What to look out for and how to protect yourse...The Attack Landscape of 2020 – What to look out for and how to protect yourse...
The Attack Landscape of 2020 – What to look out for and how to protect yourse...
 
第四回月次セミナー(公開版)
第四回月次セミナー(公開版)第四回月次セミナー(公開版)
第四回月次セミナー(公開版)
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_libraries
 
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.
Alberto López: Candies for everybody: hacking from 9 a.m. to 6 p.m.
 
Candies for everybody - Meet Magento Italia 2015
Candies for everybody - Meet Magento Italia 2015Candies for everybody - Meet Magento Italia 2015
Candies for everybody - Meet Magento Italia 2015
 
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPPHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
 
BSSML17 - API and WhizzML
BSSML17 - API and WhizzMLBSSML17 - API and WhizzML
BSSML17 - API and WhizzML
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCP
 

Recently uploaded

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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 Pakistandanishmna97
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 

Recently uploaded (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

APIs Restfull