SlideShare una empresa de Scribd logo
1 de 47
APIs Tech Talk
API Craft Meetup – 20 June 2015
Today’s speaker
Anil Sagar
asagar@apigee.com
Apigee
API Craft - Meetup
• API Design
• Various API Platform Analysis – Use Cases
• Building API Server as a tier
• API Server -- Mobile App
• Usergrid
• API Studio
• Apigee 127
API Craft - Meetup
• Why APIs ?
• API Design Best Practices
• Importance of API Server
• Usergrid – Removing a server side layer
• Introduction to Apigee 127, Hands On
• Introduction to Usergrid, Hands On
• App Contest - Hackathon
• Code Sprints – Open Source Contribution
• Why (REST) APIs ?
• API Eco System
• Web API Design
• Q & A
Today’s Overview
Why ( REST ) APIs ?
8
APIs
9
APIs
Web
Point of Sale
Partner
App, API, Analytics
Infrastructure
Mobile
ESB, SOA,
App Servers,
Databases
Backend Services
API Eco System
11
DIGITAL VALUE CHAIN
12
Digital requires the right foundation
API and data
Reporting and
monitoring Monetization
Global
deployment
Security
Onboarding
API
documentation
Developer
authentication
Mobile
optimization
Traffic
management Partner
customization
Transformation
Versioning
Predictive
analytics
Data
API Tools & Softwares
14
APIs…
Web API Design
REST APIs
• Architecture Style – Not a Standard
• Performance, Scalability, Simplicity
• Typically, Communicate over HTTP
• Using HTTP Verbs
– GET
– POST
– DELETE
– PUT
Nouns are Good; Verbs are bad
17
Keep Verbs out of your Base URLs
Keep Verbs out of your Base URLs
Singular Nouns or Plural Nouns ?
20
Singular Nouns or Plural Nouns ?
• Foursquare
– /checkins
• GroupOn
– /deals
• Zappos
– /Product
Singular Nouns or Plural Nouns ?
• Avoid Mixed Model
• Consistent
• Prefer plural names
– Reads more Easily
– Intuitive
Concrete Names are better than abstract…
23
Concrete Names are better than abstract…
• Abstractions is Not Always Meaningful
• Depends on your scenario
• Keep Number of Resources between 12 - 24
Associations
• /resource/identifier/resource
Complexity – Put it behind the ?
• States that can be updated, changed, queried
• Attributes associated with resource
Handling Errors…
• Important piece of puzzle
• Other Side of the API is a black box
Handling Errors – Best Practices
• Granular Error Messages
• Link to Documentation
• Aligning Errors with Status Codes
• Verbose as Possible
Handling Errors – Status Codes
• Start With 3 Codes
– 200 – OK – Everything is Fine
– 400 – BAD REQUEST – Something wrong with App
– 500 – INTERNAL SERVER APP – Something wrong with
Server
• Not more than 8 Codes
– 201 , 304, 404, 401, 403
Handling Errors – Status Codes
• Start With 3 Codes
– 200 – OK – Everything is Fine
– 400 – BAD REQUEST – Something wrong with App
– 500 – INTERNAL SERVER APP – Something wrong with
Server
• Not more than 8 Codes
– 201 , 304, 404, 401, 403
Versioning
• Never Release without Version
– /v1/dogs
• Simple Ordinal Number
• Atleast one version back
• How long to maintain version ?
– One Developer Cycle
Pagination & Partial Response
• Pagination
– Offset
– Limit
• Include Meta Data
• Set Defaults
• Partial Response
– As optional Parameter
– /dogs?fields=name,color,location
Support Multiple Formats
• Support Multiple Formats of Data
– JSON
– XML
• Default format ?
• Syntax
– Google : ?alt=json
– FourSquare : /venue.json
– Digg : Accept : application/json
Secure Your APIs
• Many Schools of Thought
– OAuth 1.0 a : Twitter
– Permissions Service API : Paypal
– OAuth 2.0 : Facebook
• What should you do ?
– OAuth 2.0
Other API Tips…
• Attribute Names – Camel Case
• Search
– /dog?q=red
– /owners/5678/dogs?q=fluffy+fur
– /search.xml?q=fluffy+fur
• Consolidate API Requests in one domain
– Developers.example.com
• Complement with SDKs
Securing your APIs – OAuth 2.0
OAuth 2.0
Developer
OAuth
OAuth
Access Tokens
Identification info from the requesting
application (client ID and secret)
+
Resource owner credentials (if
needed)
+
Optional information about what the
application wants to do with the
resource (scope)
=
Access Token and (optional) refresh
token
Access Tokens are credentials that allow access to a protected resource for
a specific application to perform only certain actions for a limited period of
time.
Refresh Tokens
Identification info from the requesting
application (client ID and secret)
+Refresh token
+Optional information about what the
application wants to do with the
resource (scope)
=Access Token
Refresh Tokens, if provided, represent a limited right to reauthorize the granted
access by obtaining new access tokens.
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Protocol
Transformation
Mobile
Optimization
Versioning
& Enrichment
Security
Mediation
Traffic
Management
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Protocol
Transformation
Translate between REST to SOAP
Translate between XML & JSON
Mix HTTP and HTTPS Targets
2 Way SSL Target Security
Manage External Data Sources
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Mobile
Optimization
Compression & Decompression (gzip)
Manage Pagination
Streaming Payload Options
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Versioning
& Enrichment
Emulate Prior Release
Mock New, Unavailable Services
Mashup Data from Different Sources
Mashup Functionality from Different
Sources
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Security
Mediation
App Level Authentication
User Level Authentication
Custom Attributes/Key Translation
Granular Analytics
© 2013 Apigee Confidential – All Rights Reserved
Common API Provider Concerns
Rate Limit / Quota Management
Spike Arrest
Code Injection Blocking
DoS Protection
Bogus Traffic/Probing Block
Custom Rule Enforcement
Traffic
Management
Q & A
https://community.apigee.com
Thank you

Más contenido relacionado

La actualidad más candente

What is APIGEE? What are the benefits of APIGEE?
What is APIGEE? What are the benefits of APIGEE?What is APIGEE? What are the benefits of APIGEE?
What is APIGEE? What are the benefits of APIGEE?IQ Online Training
 
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations WorkshopI Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations WorkshopApigee | Google Cloud
 
We built this city: Behind the scenes of Apigee Edge
We built this city: Behind the scenes of Apigee EdgeWe built this city: Behind the scenes of Apigee Edge
We built this city: Behind the scenes of Apigee EdgeApigee | Google Cloud
 
Developer Services: Making Developers Successful
Developer Services: Making Developers SuccessfulDeveloper Services: Making Developers Successful
Developer Services: Making Developers SuccessfulApigee | Google Cloud
 
2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service meshJoel Gauci
 
Apigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee | Google Cloud
 
How Apigee Api Management Platform Helps with Digital Excellence
How Apigee Api Management Platform Helps with Digital ExcellenceHow Apigee Api Management Platform Helps with Digital Excellence
How Apigee Api Management Platform Helps with Digital ExcellenceRam Kumar
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop Apigee | Google Cloud
 
Adapt or Die DevJam: San Francisco, Sept 27 2016
Adapt or Die DevJam: San Francisco, Sept 27 2016Adapt or Die DevJam: San Francisco, Sept 27 2016
Adapt or Die DevJam: San Francisco, Sept 27 2016Apigee | Google Cloud
 
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile Platform
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile PlatformI Love APIs 2015: Implementing an API Tier to Enable a New Mobile Platform
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile PlatformApigee | Google Cloud
 

La actualidad más candente (20)

What is APIGEE? What are the benefits of APIGEE?
What is APIGEE? What are the benefits of APIGEE?What is APIGEE? What are the benefits of APIGEE?
What is APIGEE? What are the benefits of APIGEE?
 
How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations WorkshopI Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
 
We built this city: Behind the scenes of Apigee Edge
We built this city: Behind the scenes of Apigee EdgeWe built this city: Behind the scenes of Apigee Edge
We built this city: Behind the scenes of Apigee Edge
 
Developer Services: Making Developers Successful
Developer Services: Making Developers SuccessfulDeveloper Services: Making Developers Successful
Developer Services: Making Developers Successful
 
2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh
 
Webcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product DemoWebcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product Demo
 
Apigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven Actions
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
 
How Apigee Api Management Platform Helps with Digital Excellence
How Apigee Api Management Platform Helps with Digital ExcellenceHow Apigee Api Management Platform Helps with Digital Excellence
How Apigee Api Management Platform Helps with Digital Excellence
 
Deep-Dive: Secure API Management
Deep-Dive: Secure API ManagementDeep-Dive: Secure API Management
Deep-Dive: Secure API Management
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
 
What are your APIs Worth?
What are your APIs Worth?What are your APIs Worth?
What are your APIs Worth?
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
 
Adapt or Die DevJam: San Francisco, Sept 27 2016
Adapt or Die DevJam: San Francisco, Sept 27 2016Adapt or Die DevJam: San Francisco, Sept 27 2016
Adapt or Die DevJam: San Francisco, Sept 27 2016
 
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile Platform
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile PlatformI Love APIs 2015: Implementing an API Tier to Enable a New Mobile Platform
I Love APIs 2015: Implementing an API Tier to Enable a New Mobile Platform
 
API Management and Kubernetes
API Management and KubernetesAPI Management and Kubernetes
API Management and Kubernetes
 
API Security Lifecycle
API Security LifecycleAPI Security Lifecycle
API Security Lifecycle
 
API Design Workflows
API Design WorkflowsAPI Design Workflows
API Design Workflows
 
Webcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product DemoWebcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product Demo
 

Destacado

Managing Objects and Data in Apache Cassandra
Managing Objects and Data in Apache CassandraManaging Objects and Data in Apache Cassandra
Managing Objects and Data in Apache CassandraDataStax
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and dockerBen Bromhead
 
Cassandra Tutorial
Cassandra TutorialCassandra Tutorial
Cassandra Tutorialmubarakss
 
Next Best Action: Personalization with Apigee
Next Best Action: Personalization with Apigee Next Best Action: Personalization with Apigee
Next Best Action: Personalization with Apigee Apigee | Google Cloud
 
Economic models for reinventing telco webcast by vision mobile, apigee
Economic models for reinventing telco   webcast by vision mobile, apigeeEconomic models for reinventing telco   webcast by vision mobile, apigee
Economic models for reinventing telco webcast by vision mobile, apigeeSlashData
 
Apigee centralite io t webinar july 2015 share (2)
Apigee centralite io t webinar july 2015 share (2)Apigee centralite io t webinar july 2015 share (2)
Apigee centralite io t webinar july 2015 share (2)Apigee | Google Cloud
 
Cassandra on Docker
Cassandra on DockerCassandra on Docker
Cassandra on DockerInstaclustr
 
Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014David M. Johnson
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyOren Farhi
 
DataStax: Dockerizing Cassandra on Modern Linux
DataStax: Dockerizing Cassandra on Modern LinuxDataStax: Dockerizing Cassandra on Modern Linux
DataStax: Dockerizing Cassandra on Modern LinuxDataStax Academy
 
Rock-solid Magento Deployments (and Development)
Rock-solid Magento Deployments (and Development)Rock-solid Magento Deployments (and Development)
Rock-solid Magento Deployments (and Development)AOE
 
Magento 2 Code Generation Tools
Magento 2 Code Generation ToolsMagento 2 Code Generation Tools
Magento 2 Code Generation ToolsÓscar Recio Soria
 
Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Apigee | Google Cloud
 
The right tools for the right job (or: surviving Magento 2 coding)
The right tools for the right job (or: surviving Magento 2 coding)The right tools for the right job (or: surviving Magento 2 coding)
The right tools for the right job (or: surviving Magento 2 coding)MageSpecialist
 
Max Yekaterynenko - Magento Architecture, Next Steps
Max Yekaterynenko - Magento Architecture, Next StepsMax Yekaterynenko - Magento Architecture, Next Steps
Max Yekaterynenko - Magento Architecture, Next StepsMeet Magento Italy
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopI Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopApigee | Google Cloud
 
Max Pronko - Best practices for checkout customisation in Magento 2
Max Pronko - Best practices for checkout customisation in Magento 2Max Pronko - Best practices for checkout customisation in Magento 2
Max Pronko - Best practices for checkout customisation in Magento 2Meet Magento Italy
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101Angus Li
 

Destacado (20)

Managing Objects and Data in Apache Cassandra
Managing Objects and Data in Apache CassandraManaging Objects and Data in Apache Cassandra
Managing Objects and Data in Apache Cassandra
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and docker
 
Cassandra Tutorial
Cassandra TutorialCassandra Tutorial
Cassandra Tutorial
 
Next Best Action: Personalization with Apigee
Next Best Action: Personalization with Apigee Next Best Action: Personalization with Apigee
Next Best Action: Personalization with Apigee
 
Economic models for reinventing telco webcast by vision mobile, apigee
Economic models for reinventing telco   webcast by vision mobile, apigeeEconomic models for reinventing telco   webcast by vision mobile, apigee
Economic models for reinventing telco webcast by vision mobile, apigee
 
Apigee centralite io t webinar july 2015 share (2)
Apigee centralite io t webinar july 2015 share (2)Apigee centralite io t webinar july 2015 share (2)
Apigee centralite io t webinar july 2015 share (2)
 
Cassandra via-docker
Cassandra via-dockerCassandra via-docker
Cassandra via-docker
 
Cassandra on Docker
Cassandra on DockerCassandra on Docker
Cassandra on Docker
 
Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
DataStax: Dockerizing Cassandra on Modern Linux
DataStax: Dockerizing Cassandra on Modern LinuxDataStax: Dockerizing Cassandra on Modern Linux
DataStax: Dockerizing Cassandra on Modern Linux
 
A Checklist for Every API Call
A Checklist for Every API CallA Checklist for Every API Call
A Checklist for Every API Call
 
Rock-solid Magento Deployments (and Development)
Rock-solid Magento Deployments (and Development)Rock-solid Magento Deployments (and Development)
Rock-solid Magento Deployments (and Development)
 
Magento 2 Code Generation Tools
Magento 2 Code Generation ToolsMagento 2 Code Generation Tools
Magento 2 Code Generation Tools
 
Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge
 
The right tools for the right job (or: surviving Magento 2 coding)
The right tools for the right job (or: surviving Magento 2 coding)The right tools for the right job (or: surviving Magento 2 coding)
The right tools for the right job (or: surviving Magento 2 coding)
 
Max Yekaterynenko - Magento Architecture, Next Steps
Max Yekaterynenko - Magento Architecture, Next StepsMax Yekaterynenko - Magento Architecture, Next Steps
Max Yekaterynenko - Magento Architecture, Next Steps
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopI Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
 
Max Pronko - Best practices for checkout customisation in Magento 2
Max Pronko - Best practices for checkout customisation in Magento 2Max Pronko - Best practices for checkout customisation in Magento 2
Max Pronko - Best practices for checkout customisation in Magento 2
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101
 

Similar a API Design Best Practices & Tech Talk : API Craft Meetup @ Apigee

2013 02-apache conna-api-manager-asanka
2013 02-apache conna-api-manager-asanka2013 02-apache conna-api-manager-asanka
2013 02-apache conna-api-manager-asankaWSO2
 
Extend soa with api management spoug- Madrid
Extend soa with api management   spoug- MadridExtend soa with api management   spoug- Madrid
Extend soa with api management spoug- MadridVinay Kumar
 
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat, Lombar...
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat,  Lombar...apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat,  Lombar...
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat, Lombar...apidays
 
Extend soa with api management Sangam18
Extend soa with api management Sangam18Extend soa with api management Sangam18
Extend soa with api management Sangam18Vinay Kumar
 
aip-developer-intro_pag2015
aip-developer-intro_pag2015aip-developer-intro_pag2015
aip-developer-intro_pag2015Matthew Vaughn
 
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhuapidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhuapidays
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsColdFusionConference
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure ADSharePointRadi
 
Extend soa with api management Doag18
Extend soa with api management Doag18Extend soa with api management Doag18
Extend soa with api management Doag18Vinay Kumar
 
Vaughn aip walkthru_pag2015
Vaughn aip walkthru_pag2015Vaughn aip walkthru_pag2015
Vaughn aip walkthru_pag2015Araport
 
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...WSO2
 
API Management Building Blocks and Business value
API Management   Building Blocks and Business valueAPI Management   Building Blocks and Business value
API Management Building Blocks and Business valueWSO2
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Callon Campbell
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxapidays
 

Similar a API Design Best Practices & Tech Talk : API Craft Meetup @ Apigee (20)

2013 02-apache conna-api-manager-asanka
2013 02-apache conna-api-manager-asanka2013 02-apache conna-api-manager-asanka
2013 02-apache conna-api-manager-asanka
 
M meijer api management - tech-days 2015
M meijer   api management - tech-days 2015M meijer   api management - tech-days 2015
M meijer api management - tech-days 2015
 
Extend soa with api management spoug- Madrid
Extend soa with api management   spoug- MadridExtend soa with api management   spoug- Madrid
Extend soa with api management spoug- Madrid
 
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat, Lombar...
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat,  Lombar...apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat,  Lombar...
apidays London 2023 - API Metrics matters in APIOps, Ludovic Pourrat, Lombar...
 
REST APIs
REST APIsREST APIs
REST APIs
 
Extend soa with api management Sangam18
Extend soa with api management Sangam18Extend soa with api management Sangam18
Extend soa with api management Sangam18
 
aip-developer-intro_pag2015
aip-developer-intro_pag2015aip-developer-intro_pag2015
aip-developer-intro_pag2015
 
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhuapidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
Extend soa with api management Doag18
Extend soa with api management Doag18Extend soa with api management Doag18
Extend soa with api management Doag18
 
Smartone v1.0
Smartone v1.0Smartone v1.0
Smartone v1.0
 
Vaughn aip walkthru_pag2015
Vaughn aip walkthru_pag2015Vaughn aip walkthru_pag2015
Vaughn aip walkthru_pag2015
 
Operating your Production API
Operating your Production APIOperating your Production API
Operating your Production API
 
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
 
API Management Building Blocks and Business value
API Management   Building Blocks and Business valueAPI Management   Building Blocks and Business value
API Management Building Blocks and Business value
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptx
 

Último

multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxNiranjanYadav41
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxachiever3003
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectssuserb6619e
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 

Último (20)

multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptx
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 

API Design Best Practices & Tech Talk : API Craft Meetup @ Apigee

  • 1. APIs Tech Talk API Craft Meetup – 20 June 2015
  • 3. API Craft - Meetup • API Design • Various API Platform Analysis – Use Cases • Building API Server as a tier • API Server -- Mobile App • Usergrid • API Studio • Apigee 127
  • 4. API Craft - Meetup • Why APIs ? • API Design Best Practices • Importance of API Server • Usergrid – Removing a server side layer • Introduction to Apigee 127, Hands On • Introduction to Usergrid, Hands On • App Contest - Hackathon • Code Sprints – Open Source Contribution
  • 5. • Why (REST) APIs ? • API Eco System • Web API Design • Q & A Today’s Overview
  • 6. Why ( REST ) APIs ?
  • 7.
  • 9. 9 APIs Web Point of Sale Partner App, API, Analytics Infrastructure Mobile ESB, SOA, App Servers, Databases Backend Services
  • 12. 12 Digital requires the right foundation API and data Reporting and monitoring Monetization Global deployment Security Onboarding API documentation Developer authentication Mobile optimization Traffic management Partner customization Transformation Versioning Predictive analytics Data
  • 13. API Tools & Softwares
  • 16. REST APIs • Architecture Style – Not a Standard • Performance, Scalability, Simplicity • Typically, Communicate over HTTP • Using HTTP Verbs – GET – POST – DELETE – PUT
  • 17. Nouns are Good; Verbs are bad 17
  • 18. Keep Verbs out of your Base URLs
  • 19. Keep Verbs out of your Base URLs
  • 20. Singular Nouns or Plural Nouns ? 20
  • 21. Singular Nouns or Plural Nouns ? • Foursquare – /checkins • GroupOn – /deals • Zappos – /Product
  • 22. Singular Nouns or Plural Nouns ? • Avoid Mixed Model • Consistent • Prefer plural names – Reads more Easily – Intuitive
  • 23. Concrete Names are better than abstract… 23
  • 24. Concrete Names are better than abstract… • Abstractions is Not Always Meaningful • Depends on your scenario • Keep Number of Resources between 12 - 24
  • 26. Complexity – Put it behind the ? • States that can be updated, changed, queried • Attributes associated with resource
  • 27. Handling Errors… • Important piece of puzzle • Other Side of the API is a black box
  • 28. Handling Errors – Best Practices • Granular Error Messages • Link to Documentation • Aligning Errors with Status Codes • Verbose as Possible
  • 29. Handling Errors – Status Codes • Start With 3 Codes – 200 – OK – Everything is Fine – 400 – BAD REQUEST – Something wrong with App – 500 – INTERNAL SERVER APP – Something wrong with Server • Not more than 8 Codes – 201 , 304, 404, 401, 403
  • 30. Handling Errors – Status Codes • Start With 3 Codes – 200 – OK – Everything is Fine – 400 – BAD REQUEST – Something wrong with App – 500 – INTERNAL SERVER APP – Something wrong with Server • Not more than 8 Codes – 201 , 304, 404, 401, 403
  • 31. Versioning • Never Release without Version – /v1/dogs • Simple Ordinal Number • Atleast one version back • How long to maintain version ? – One Developer Cycle
  • 32. Pagination & Partial Response • Pagination – Offset – Limit • Include Meta Data • Set Defaults • Partial Response – As optional Parameter – /dogs?fields=name,color,location
  • 33. Support Multiple Formats • Support Multiple Formats of Data – JSON – XML • Default format ? • Syntax – Google : ?alt=json – FourSquare : /venue.json – Digg : Accept : application/json
  • 34. Secure Your APIs • Many Schools of Thought – OAuth 1.0 a : Twitter – Permissions Service API : Paypal – OAuth 2.0 : Facebook • What should you do ? – OAuth 2.0
  • 35. Other API Tips… • Attribute Names – Camel Case • Search – /dog?q=red – /owners/5678/dogs?q=fluffy+fur – /search.xml?q=fluffy+fur • Consolidate API Requests in one domain – Developers.example.com • Complement with SDKs
  • 36. Securing your APIs – OAuth 2.0
  • 38. Access Tokens Identification info from the requesting application (client ID and secret) + Resource owner credentials (if needed) + Optional information about what the application wants to do with the resource (scope) = Access Token and (optional) refresh token Access Tokens are credentials that allow access to a protected resource for a specific application to perform only certain actions for a limited period of time.
  • 39. Refresh Tokens Identification info from the requesting application (client ID and secret) +Refresh token +Optional information about what the application wants to do with the resource (scope) =Access Token Refresh Tokens, if provided, represent a limited right to reauthorize the granted access by obtaining new access tokens.
  • 40. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Protocol Transformation Mobile Optimization Versioning & Enrichment Security Mediation Traffic Management
  • 41. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Protocol Transformation Translate between REST to SOAP Translate between XML & JSON Mix HTTP and HTTPS Targets 2 Way SSL Target Security Manage External Data Sources
  • 42. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Mobile Optimization Compression & Decompression (gzip) Manage Pagination Streaming Payload Options
  • 43. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Versioning & Enrichment Emulate Prior Release Mock New, Unavailable Services Mashup Data from Different Sources Mashup Functionality from Different Sources
  • 44. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Security Mediation App Level Authentication User Level Authentication Custom Attributes/Key Translation Granular Analytics
  • 45. © 2013 Apigee Confidential – All Rights Reserved Common API Provider Concerns Rate Limit / Quota Management Spike Arrest Code Injection Blocking DoS Protection Bogus Traffic/Probing Block Custom Rule Enforcement Traffic Management

Notas del editor

  1. Ask Questions – Why do we need API Every day we make N -> API Calls Web , App , Devices etc etc..
  2. Main Point You can’t wait and see what happens, you will die. Script You could wait….  These are brands we have all known for many years but they chose to wait rather than adapt to the change. And when you lose momentum you lose significance, you die in the mind of customers. This is true for every business, no matter how big they are or how long they’ve been around. The change in consumer and employee expectations has happened fast, and if you don’t keep up, you risk losing business that you won’t be able to get back later.. The time to change is now. The longer you wait, the more disruptive the change will be when you no longer have a choice.
  3. Blood Vessels of Every Business Connects Business Process, Services , Data >>>>>>>>>>>>> Internal Teams, Customers, Open Developers Defacto Standard Connecting Entities in Eco System Glue in Digital Value Chain
  4. Main Point The value chain is at the heart of the solution Script These aren’t the kind of things that you can accomplish as an afterthought with some bolt-on solution. Only a solution that extends across the digital value chain will offer the necessary capabilities. Let me explain. Between the end user and the business’s back-end systems lie several important participants and pieces of technology, all of which need to work together seamlessly. Any and all apps, the developers who build them, the API they use, the API team—all of these things have requirements that need to be addressed. The right hand side is the hard part, that’s IT that is trying to do their best but the demands that are placed on them are ever increasing and the budgets are ever decreasing.
  5. Main Point The value chain is at the heart of the solution Script These aren’t the kind of things that you can accomplish as an afterthought with some bolt-on solution. Only a solution that extends across the digital value chain will offer the necessary capabilities. Let me explain. Between the end user and the business’s back-end systems lie several important participants and pieces of technology, all of which need to work together seamlessly. Any and all apps, the developers who build them, the API they use, the API team—all of these things have requirements that need to be addressed. The right hand side is the hard part, that’s IT that is trying to do their best but the demands that are placed on them are ever increasing and the budgets are ever decreasing.
  6. Main Point The value chain is at the heart of the solution Script These aren’t the kind of things that you can accomplish as an afterthought with some bolt-on solution. Only a solution that extends across the digital value chain will offer the necessary capabilities. Let me explain. Between the end user and the business’s back-end systems lie several important participants and pieces of technology, all of which need to work together seamlessly. Any and all apps, the developers who build them, the API they use, the API team—all of these things have requirements that need to be addressed. The right hand side is the hard part, that’s IT that is trying to do their best but the demands that are placed on them are ever increasing and the budgets are ever decreasing.
  7. Ask Questions – Why do we need API Every day we make N -> API Calls Web , App , Devices etc etc..
  8. - The success of an API design is measured by how quickly developers can get up to speed and start enjoying success using your API.
  9. The base URL is the most important design affordance of your API. A simple and intuitive base URL design makes using your API easy.
  10. Soon you have a long list of URLs and no consistent pattern making it difficult for developers to learn how to use your API.
  11. Use HTTP verbs to operate on the collections and elements. For our dog resources, we have two base URLs that use nouns as labels, and we can operate on them with HTTP verbs. Our HTTP verbs are POST, GET, PUT, and DELETE. (We think of them as mapping to the acronym, CRUD (Create-Read-Update-Delete).) With our two resources (/dogs and /dogs/1234) and the four HTTP verbs, we have a rich set of capability that's intuitive to the developer
  12. The base URL is the most important design affordance of your API. A simple and intuitive base URL design makes using your API easy.
  13. Being consistent allows developers to predict and guess the method calls as they learn to work with your API.
  14. An API that models everything at the highest level of abstraction - as /items or /assets in our example - loses the opportunity to paint a tangible picture for developers to know what they can do with this API. It is more compelling and useful to see the resources listed as blogs, videos, and news articles.
  15. An API that models everything at the highest level of abstraction - as /items or /assets in our example - loses the opportunity to paint a tangible picture for developers to know what they can do with this API. It is more compelling and useful to see the resources listed as blogs, videos, and news articles.
  16. An API that models everything at the highest level of abstraction - as /items or /assets in our example - loses the opportunity to paint a tangible picture for developers to know what they can do with this API. It is more compelling and useful to see the resources listed as blogs, videos, and news articles.
  17. An API that models everything at the highest level of abstraction - as /items or /assets in our example - loses the opportunity to paint a tangible picture for developers to know what they can do with this API. It is more compelling and useful to see the resources listed as blogs, videos, and news articles.
  18. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to Wikipedia to figure out what you're trying to tell them.
  19. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to Wikipedia to figure out what you're trying to tell them.
  20. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to Wikipedia to figure out what you're trying to tell them.
  21. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to Wikipedia to figure out what you're trying to tell them.
  22. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to Wikipedia to figure out what you're trying to tell them.
  23. JSON is winning out as the default format. JSON is the closest thing we have to universal language. Even if the back end is built in Ruby on Rails, PHP, Java, Python etc., most projects probably touch JavaScript for the front-end. It also has the advantage of being terse - less verbose than XML.
  24. Use the latest and greatest OAuth - OAuth 2.0 (as of this writing). It means that Web or mobile apps that expose APIs don’t have to share passwords. It allows the API provider to revoke tokens for an individual user, for an entire app, without requiring the user to change their original password. This is critical if a mobile device is compromised or if a rogue app is discovered.
  25. Use the latest and greatest OAuth - OAuth 2.0 (as of this writing). It means that Web or mobile apps that expose APIs don’t have to share passwords. It allows the API provider to revoke tokens for an individual user, for an entire app, without requiring the user to change their original password. This is critical if a mobile device is compromised or if a rogue app is discovered.
  26. Ask Questions – Why do we need API Every day we make N -> API Calls Web , App , Devices etc etc..
  27. Use the latest and greatest OAuth - OAuth 2.0 (as of this writing). It means that Web or mobile apps that expose APIs don’t have to share passwords. It allows the API provider to revoke tokens for an individual user, for an entire app, without requiring the user to change their original password. This is critical if a mobile device is compromised or if a rogue app is discovered.
  28. Use the latest and greatest OAuth - OAuth 2.0 (as of this writing). It means that Web or mobile apps that expose APIs don’t have to share passwords. It allows the API provider to revoke tokens for an individual user, for an entire app, without requiring the user to change their original password. This is critical if a mobile device is compromised or if a rogue app is discovered.
  29. Use the latest and greatest OAuth - OAuth 2.0 (as of this writing). It means that Web or mobile apps that expose APIs don’t have to share passwords. It allows the API provider to revoke tokens for an individual user, for an entire app, without requiring the user to change their original password. This is critical if a mobile device is compromised or if a rogue app is discovered.