SlideShare uma empresa Scribd logo
1 de 73
Baixar para ler offline
for
DESIGNING THE APIS
an internal set of services
albertoleal
albertonb@gmail.com
https://github.com/globocom
for
DESIGNING THE
an internal
APIS
set of services
what is an API ?
micro-services
environment
"A concept where an application is
decomposed into small and loosely coupled
services, where each service has a single
responsibility, running in its own process.
ad$
A
Evolving a service
search
accounts
video
images
No restriction
Maintainable
and
Stable
Replacement
test the services?
HOWTO
define services contract?
manage deployment?
How do we get started
with our
API?
API Modeling
API Modeling - Conceptual Model
purpose
audience
developer,developer, developer
Developer
as a
Customer
API
as a
Product
API Modeling - Ubiquitous Language
API Modeling
!
Do not reinvent
the wheel
HAL
JSON API
JSON Schema
…
what makes a great API?
is
flexible
and
simple to use
/cars?fields=name,model,year
/cars
uses
nouns
instead of
verbs
/collection/<resource><?filters>
/cars/123?fields=name,model,year
/cars
/cars?status=new
/cars/123
/getAllCars
/getAllNewCars
/getCar/123
uses
HTTP Verbs
to perform operations
on the elements
Resource
POST
(create)
GET
(read)
PUT
(replace)
PATCH
(update)
DELETE
(delete)
/cars new car list all cars
new car
or
error
error
delete all
cars
/cars/123 error show car 123
update car
or
error
modify car
or
error
delete car
123
returns meaningful errors
HTTP/1.1 400 Bad Request	
!
!
{	
"errorCode" : 123, 	
"moreInfo": “http://dev.api.com/errors/123"	
"errors": [	
{	
"name": [	
“can’t be blank"	
]	
}	
]	
}
use http status code
payload as verbose as possible
400 - 401 - 403 - 404 - 500
Bad Request Forbidden
Unauthorized Not Found
Internal Server Error
provides great support
Documentation
Documentation
Documentation Communication
CommunityDocumentation Communication
is secure
what about versioning?
application/vnd.example.com+json; version=1
application/vnd.example.com.v1+json;
Accept:
test the services?
HOWTO
define services contract?
manage deployment?
ad$
A
contracts enable
service independence
but…
"A concept where an application is
decomposed into small and loosely coupled
services, where each service has a single
responsibility, running in its own process.
Contracts can also
couple
service providers
and
consumers
{	
"title": "App",	
"type": "object",	
"properties": {	
"name": {	
"type": "string",	
"title": "Name"	
},	
"uris": {	
"type": "array",	
"title":"URIs",	
"items": {	
"type": "string"	
}	
}	
},	
"required": ["name"]	
}	
required fields
{	
"links": [ 	
{	
"href": "https://domain/apps",	
"method": "POST",	
"rel": “create”,	
	 	 "schema": {	
	 	 	 	 	 "$ref": "https://domain/schemas/apps/new_app"	
}	
}	
…	
]	
}
Consumer-Driven Contracts:
A Service Evolution Pattern
http://martinfowler.com/articles/consumerDrivenContracts.html
test the services?
HOWTO
define services contract?
manage deployment?
Deployment
imagessearch
Deployment
search
Deployment
test the services?
HOWTO
define services contract?
manage deployment?
Contract
Tests
Integration

Tests
be positive
thanks!
@albertoleal
albertonb@gmail.com

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

How do i start an uber clone app
How do i start an uber clone app How do i start an uber clone app
How do i start an uber clone app
 
SP-Assurance
SP-AssuranceSP-Assurance
SP-Assurance
 
Continuous Integration and Continuous Deployment
Continuous Integration and Continuous DeploymentContinuous Integration and Continuous Deployment
Continuous Integration and Continuous Deployment
 
An Inforgraphic to Learn React Native
An Inforgraphic to Learn React NativeAn Inforgraphic to Learn React Native
An Inforgraphic to Learn React Native
 
Types of mobile apps
Types of mobile appsTypes of mobile apps
Types of mobile apps
 
Building REST APIs that don't suck for modern day SPAs
Building REST APIs that don't suck for modern day SPAsBuilding REST APIs that don't suck for modern day SPAs
Building REST APIs that don't suck for modern day SPAs
 
iphone Mobile Browser Application to create sales order
iphone Mobile Browser Application to create sales orderiphone Mobile Browser Application to create sales order
iphone Mobile Browser Application to create sales order
 
MPS Infotech - Portfolio
MPS Infotech - PortfolioMPS Infotech - Portfolio
MPS Infotech - Portfolio
 
Introduction to GraphQL for beginners
Introduction to GraphQL for beginnersIntroduction to GraphQL for beginners
Introduction to GraphQL for beginners
 
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Evole18 | Ian Reasor & Amol Anand | AEM and SPA Content Management
Evole18 | Ian Reasor & Amol Anand | AEM and SPA Content ManagementEvole18 | Ian Reasor & Amol Anand | AEM and SPA Content Management
Evole18 | Ian Reasor & Amol Anand | AEM and SPA Content Management
 
Rebooting APIs at scale
Rebooting APIs at scaleRebooting APIs at scale
Rebooting APIs at scale
 
aProbe mobile biometrics system overview
aProbe mobile biometrics system overviewaProbe mobile biometrics system overview
aProbe mobile biometrics system overview
 
Introduction to xamarin.forms
Introduction to xamarin.formsIntroduction to xamarin.forms
Introduction to xamarin.forms
 
Apimanagement
ApimanagementApimanagement
Apimanagement
 
Intro to Web Map APIs
Intro to Web Map APIsIntro to Web Map APIs
Intro to Web Map APIs
 
My cv
My cvMy cv
My cv
 
The relevance of design principles for WEB APIs
The relevance of design principles for WEB APIsThe relevance of design principles for WEB APIs
The relevance of design principles for WEB APIs
 
Response Visualizations in Postman
Response Visualizations in PostmanResponse Visualizations in Postman
Response Visualizations in Postman
 

Destaque (7)

Antivirus
AntivirusAntivirus
Antivirus
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Alimentos ecológicos. ¿Sabes lo que son?
Alimentos ecológicos. ¿Sabes lo que son?Alimentos ecológicos. ¿Sabes lo que son?
Alimentos ecológicos. ¿Sabes lo que son?
 
A Índia da tv e a Índia real Revisado
A Índia da tv e a Índia real RevisadoA Índia da tv e a Índia real Revisado
A Índia da tv e a Índia real Revisado
 
Abby's body project
Abby's body projectAbby's body project
Abby's body project
 
Masks of Bulls
Masks of BullsMasks of Bulls
Masks of Bulls
 
Toma de decisiones (Carlos Lago)
Toma de decisiones (Carlos Lago)Toma de decisiones (Carlos Lago)
Toma de decisiones (Carlos Lago)
 

Semelhante a Designing the APIs for an internal set of services

Cory Couty Primary Resume
Cory Couty Primary ResumeCory Couty Primary Resume
Cory Couty Primary Resume
Cory Couty
 

Semelhante a Designing the APIs for an internal set of services (20)

Webinar: How API Lifecycle Management can help to Accelerate Growth
Webinar: How API Lifecycle Management can help to Accelerate GrowthWebinar: How API Lifecycle Management can help to Accelerate Growth
Webinar: How API Lifecycle Management can help to Accelerate Growth
 
Continuous API Strategies for Integrated Platforms
 Continuous API Strategies for Integrated Platforms Continuous API Strategies for Integrated Platforms
Continuous API Strategies for Integrated Platforms
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIs
 
API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)
 
INTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API FirstINTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API First
 
How AWS Mobile Services Providers Will Benefit From Amplify Studio_.pdf
How AWS Mobile Services Providers Will Benefit From Amplify Studio_.pdfHow AWS Mobile Services Providers Will Benefit From Amplify Studio_.pdf
How AWS Mobile Services Providers Will Benefit From Amplify Studio_.pdf
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
 
The App Evolution
The App EvolutionThe App Evolution
The App Evolution
 
API Design Principles using Oracle Apiary.io
API Design Principles using Oracle Apiary.ioAPI Design Principles using Oracle Apiary.io
API Design Principles using Oracle Apiary.io
 
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
 
API First - Best Practices for consistent API management
API First - Best Practices for consistent API managementAPI First - Best Practices for consistent API management
API First - Best Practices for consistent API management
 
Styleguide for your APIs
Styleguide for your APIsStyleguide for your APIs
Styleguide for your APIs
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie Mitra
 
The App Evolution
The App Evolution The App Evolution
The App Evolution
 
apidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoica
apidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoicaapidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoica
apidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoica
 
Cory Couty Primary Resume
Cory Couty Primary ResumeCory Couty Primary Resume
Cory Couty Primary Resume
 
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
 
Always Mind Your [Developer] Surroundings - API City 2018
Always Mind Your [Developer] Surroundings - API City 2018Always Mind Your [Developer] Surroundings - API City 2018
Always Mind Your [Developer] Surroundings - API City 2018
 
apidays LIVE Australia 2020 - Federating API Development at Australia’s large...
apidays LIVE Australia 2020 - Federating API Development at Australia’s large...apidays LIVE Australia 2020 - Federating API Development at Australia’s large...
apidays LIVE Australia 2020 - Federating API Development at Australia’s large...
 
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
Applying Domain-Driven Design to APIs and Microservices  - Austin API MeetupApplying Domain-Driven Design to APIs and Microservices  - Austin API Meetup
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
 

Mais de Alberto Leal (10)

Testing Services Effectively
Testing Services Effectively Testing Services Effectively
Testing Services Effectively
 
Contribuindo com a comunidade Open Source
Contribuindo com a comunidade Open SourceContribuindo com a comunidade Open Source
Contribuindo com a comunidade Open Source
 
O que é dojo
O que é dojoO que é dojo
O que é dojo
 
Caipira Ágil - Afinal, testes atrasam o desenvolvimento?
Caipira Ágil - Afinal, testes atrasam o desenvolvimento?Caipira Ágil - Afinal, testes atrasam o desenvolvimento?
Caipira Ágil - Afinal, testes atrasam o desenvolvimento?
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Guru-Campinas - Continuous integration
Guru-Campinas - Continuous integrationGuru-Campinas - Continuous integration
Guru-Campinas - Continuous integration
 
IBM - Apresentando jQuery
IBM - Apresentando jQueryIBM - Apresentando jQuery
IBM - Apresentando jQuery
 
Utilizando Git em Projetos Com Repositório Centralizado
Utilizando Git em Projetos Com Repositório CentralizadoUtilizando Git em Projetos Com Repositório Centralizado
Utilizando Git em Projetos Com Repositório Centralizado
 
Git - O Rebase Pode Te Assustar
Git - O Rebase Pode Te AssustarGit - O Rebase Pode Te Assustar
Git - O Rebase Pode Te Assustar
 
Prazer,Ruby On Rails
Prazer,Ruby On RailsPrazer,Ruby On Rails
Prazer,Ruby On Rails
 

Último

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Designing the APIs for an internal set of services