SlideShare a Scribd company logo
Best Practice for Asp.net API
• Restful API != Good API.
• Do what makes Sense
• Do what consumers need
Most Important things to recall
Design API
Tips
• Keep it Simple( Simple != Easy)
• No need to be creative
• Use handful of http Code
• Return/Provide what is needed
• Structure APi to make finding error easy
• Nesting resources for hierarchical objects.
Be
consistent
with the ff:
• Plurality
• Use of Nouns and verbs
• Result size
• Sorting and filtering
• Paging
Implementation
• Accept and respond with JSON.
• Versioning--> API should
stand the test of time
• Use URL versioning
• Use SSL
• Pick and
Authentication strategy that is
not basic
• Use DTO
Implementation continued
• Controller should know "Where" not "how"
• Keep validating in back end side
• Separate validation logic from object
• Handle errors gracefully and return standard error
codes.
Controller Request Validator
Handler
Service
Documentation
• Use Documentation Tools
• Keep Updated
• Remove Properties on maintenance phase
• Make easy for everyone to read
• Test readability with other devs
Upon deprecation
• Give notice for deprecation
• Point out different version or
replacement to every method and
address that is deprecated
Performance
tips
Performance is also an
important consideration.
Avoid returning too much
data at once.
Use caching to avoid repeated
queries
Last
General
Tips
• have consistency by following web
standards and conventions
• Paths of endpoints should be consistent
• use nouns only since the HTTP methods
indicate the action we want to take.
• Paths of nested resources should come after
the path of the parent resource.
• Paths should tell what is returned or
manipulated without the need to read extra
documentation to understand what it’s
doing.

More Related Content

What's hot

Application Programming Interfaces Overview Powerpoint Presentation Slides
Application Programming Interfaces Overview Powerpoint Presentation SlidesApplication Programming Interfaces Overview Powerpoint Presentation Slides
Application Programming Interfaces Overview Powerpoint Presentation Slides
SlideTeam
 
Effective API Design
Effective API DesignEffective API Design
Effective API Design
Bansilal Haudakari
 
Be My API How to Implement an API Strategy Everyone will Love
Be My API How to Implement an API Strategy Everyone will Love Be My API How to Implement an API Strategy Everyone will Love
Be My API How to Implement an API Strategy Everyone will Love
CA API Management
 
Extracting Insights from your API Programs
Extracting Insights from your API ProgramsExtracting Insights from your API Programs
Extracting Insights from your API Programs
Akana
 
Lean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps CyclesLean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps Cycles
Nordic APIs
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
Akana
 
Redefine Omni-Channel Retailing - Harness the Power of APIs
 Redefine Omni-Channel Retailing - Harness the Power of APIs Redefine Omni-Channel Retailing - Harness the Power of APIs
Redefine Omni-Channel Retailing - Harness the Power of APIs
Apigee | Google Cloud
 
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
 
API First: Going Beyond SOA, ESBs, and Integration
API First: Going Beyond SOA, ESBs, and Integration API First: Going Beyond SOA, ESBs, and Integration
API First: Going Beyond SOA, ESBs, and Integration
Apigee | Google Cloud
 
API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)
3scale
 
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPowerRealizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
Akana
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
Apigee | Google Cloud
 
Mapping out your API Strategy - 4.20.11 Webinar slides
Mapping out your API Strategy - 4.20.11 Webinar slidesMapping out your API Strategy - 4.20.11 Webinar slides
Mapping out your API Strategy - 4.20.11 Webinar slides
Apigee | Google Cloud
 
APIs in the Enterprise -Lessons Learned
APIs in the Enterprise -Lessons LearnedAPIs in the Enterprise -Lessons Learned
APIs in the Enterprise -Lessons Learned
Apigee | Google Cloud
 
KPIs CDOs Should Know & Love (webcast)
KPIs CDOs Should Know & Love (webcast)KPIs CDOs Should Know & Love (webcast)
KPIs CDOs Should Know & Love (webcast)
Apigee | Google Cloud
 
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
CA API Management
 
Decentralized APIs for Agile Businesses
Decentralized APIs for Agile BusinessesDecentralized APIs for Agile Businesses
Decentralized APIs for Agile Businesses
Nuwan Dias
 
API Marketplaces: Centers of Innovation for your Digital Enterprise
API Marketplaces: Centers of Innovation for your Digital EnterpriseAPI Marketplaces: Centers of Innovation for your Digital Enterprise
API Marketplaces: Centers of Innovation for your Digital Enterprise
WSO2
 
API Management
API ManagementAPI Management
API Management
Prolifics
 
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
Stephen Fishman
 

What's hot (20)

Application Programming Interfaces Overview Powerpoint Presentation Slides
Application Programming Interfaces Overview Powerpoint Presentation SlidesApplication Programming Interfaces Overview Powerpoint Presentation Slides
Application Programming Interfaces Overview Powerpoint Presentation Slides
 
Effective API Design
Effective API DesignEffective API Design
Effective API Design
 
Be My API How to Implement an API Strategy Everyone will Love
Be My API How to Implement an API Strategy Everyone will Love Be My API How to Implement an API Strategy Everyone will Love
Be My API How to Implement an API Strategy Everyone will Love
 
Extracting Insights from your API Programs
Extracting Insights from your API ProgramsExtracting Insights from your API Programs
Extracting Insights from your API Programs
 
Lean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps CyclesLean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps Cycles
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
 
Redefine Omni-Channel Retailing - Harness the Power of APIs
 Redefine Omni-Channel Retailing - Harness the Power of APIs Redefine Omni-Channel Retailing - Harness the Power of APIs
Redefine Omni-Channel Retailing - Harness the Power of APIs
 
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?
 
API First: Going Beyond SOA, ESBs, and Integration
API First: Going Beyond SOA, ESBs, and Integration API First: Going Beyond SOA, ESBs, and Integration
API First: Going Beyond SOA, ESBs, and Integration
 
API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)
 
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPowerRealizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
Realizing Hybrid Cloud: Using IBM Bluemix, APIs, and DataPower
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
 
Mapping out your API Strategy - 4.20.11 Webinar slides
Mapping out your API Strategy - 4.20.11 Webinar slidesMapping out your API Strategy - 4.20.11 Webinar slides
Mapping out your API Strategy - 4.20.11 Webinar slides
 
APIs in the Enterprise -Lessons Learned
APIs in the Enterprise -Lessons LearnedAPIs in the Enterprise -Lessons Learned
APIs in the Enterprise -Lessons Learned
 
KPIs CDOs Should Know & Love (webcast)
KPIs CDOs Should Know & Love (webcast)KPIs CDOs Should Know & Love (webcast)
KPIs CDOs Should Know & Love (webcast)
 
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
 
Decentralized APIs for Agile Businesses
Decentralized APIs for Agile BusinessesDecentralized APIs for Agile Businesses
Decentralized APIs for Agile Businesses
 
API Marketplaces: Centers of Innovation for your Digital Enterprise
API Marketplaces: Centers of Innovation for your Digital EnterpriseAPI Marketplaces: Centers of Innovation for your Digital Enterprise
API Marketplaces: Centers of Innovation for your Digital Enterprise
 
API Management
API ManagementAPI Management
API Management
 
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
Keys to a Successful API Strategy - How to avoid predictable pitfalls and get...
 

Similar to Api design tips

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
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
Graham Weldon
 
Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
Amazon Web Services
 
What is an Automation Framework ?
What is an Automation Framework ?�What is an Automation Framework ?�
What is an Automation Framework ?
Sriram Angajala
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
JoEllen Carter
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
AgileDenver
 
Webinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECTWebinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECT
APPSeCONNECT
 
Testing APIs in the Cloud
Testing APIs in the CloudTesting APIs in the Cloud
Testing APIs in the Cloud
SmartBear
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
Kit Brennan
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service Design
Lorna Mitchell
 
Api crash
Api crashApi crash
Api crash
Tony Nguyen
 
Api crash
Api crashApi crash
Api crash
Hoang Nguyen
 
Api crash
Api crashApi crash
Api crash
Fraboni Ec
 
Api crash
Api crashApi crash
Api crash
James Wong
 
Api crash
Api crashApi crash
Api crash
Luis Goldster
 
Api crash
Api crashApi crash
Api crash
Harry Potter
 
Api crash
Api crashApi crash
Api crash
Young Alista
 
RESTful Services
RESTful ServicesRESTful Services
RESTful Services
Jason Gerard
 
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, StoplightINTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
apidays
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
Antonio Robres Turon
 

Similar to Api design tips (20)

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...
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
 
What is an Automation Framework ?
What is an Automation Framework ?�What is an Automation Framework ?�
What is an Automation Framework ?
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Webinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECTWebinar: Embracing REST APIs through APPSeCONNECT
Webinar: Embracing REST APIs through APPSeCONNECT
 
Testing APIs in the Cloud
Testing APIs in the CloudTesting APIs in the Cloud
Testing APIs in the Cloud
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service Design
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
RESTful Services
RESTful ServicesRESTful Services
RESTful Services
 
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, StoplightINTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
INTERFACE by apidays 2023 - API Design Governance, Nauman Ali, Stoplight
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
 

More from Nickleus Jimenez

Just One More Compile syndrome_.pdf
Just One More Compile  syndrome_.pdfJust One More Compile  syndrome_.pdf
Just One More Compile syndrome_.pdf
Nickleus Jimenez
 
OauthProsCons.pptx
OauthProsCons.pptxOauthProsCons.pptx
OauthProsCons.pptx
Nickleus Jimenez
 
Unit test ideal characteristics
Unit test ideal characteristicsUnit test ideal characteristics
Unit test ideal characteristics
Nickleus Jimenez
 
DevSecOps outline
DevSecOps outlineDevSecOps outline
DevSecOps outline
Nickleus Jimenez
 
Technical debt
Technical debtTechnical debt
Technical debt
Nickleus Jimenez
 
Architecture patterns overview
Architecture patterns overviewArchitecture patterns overview
Architecture patterns overview
Nickleus Jimenez
 
Veracrypt on Ubuntu
Veracrypt on UbuntuVeracrypt on Ubuntu
Veracrypt on Ubuntu
Nickleus Jimenez
 
NickleusJimenez
NickleusJimenezNickleusJimenez
NickleusJimenez
Nickleus Jimenez
 

More from Nickleus Jimenez (8)

Just One More Compile syndrome_.pdf
Just One More Compile  syndrome_.pdfJust One More Compile  syndrome_.pdf
Just One More Compile syndrome_.pdf
 
OauthProsCons.pptx
OauthProsCons.pptxOauthProsCons.pptx
OauthProsCons.pptx
 
Unit test ideal characteristics
Unit test ideal characteristicsUnit test ideal characteristics
Unit test ideal characteristics
 
DevSecOps outline
DevSecOps outlineDevSecOps outline
DevSecOps outline
 
Technical debt
Technical debtTechnical debt
Technical debt
 
Architecture patterns overview
Architecture patterns overviewArchitecture patterns overview
Architecture patterns overview
 
Veracrypt on Ubuntu
Veracrypt on UbuntuVeracrypt on Ubuntu
Veracrypt on Ubuntu
 
NickleusJimenez
NickleusJimenezNickleusJimenez
NickleusJimenez
 

Recently uploaded

Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
AnkitaPandya11
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
NishanthaBulumulla1
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 

Recently uploaded (20)

Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 

Api design tips

  • 1. Best Practice for Asp.net API • Restful API != Good API. • Do what makes Sense • Do what consumers need Most Important things to recall
  • 2. Design API Tips • Keep it Simple( Simple != Easy) • No need to be creative • Use handful of http Code • Return/Provide what is needed • Structure APi to make finding error easy • Nesting resources for hierarchical objects.
  • 3. Be consistent with the ff: • Plurality • Use of Nouns and verbs • Result size • Sorting and filtering • Paging
  • 4. Implementation • Accept and respond with JSON. • Versioning--> API should stand the test of time • Use URL versioning • Use SSL • Pick and Authentication strategy that is not basic • Use DTO
  • 5. Implementation continued • Controller should know "Where" not "how" • Keep validating in back end side • Separate validation logic from object • Handle errors gracefully and return standard error codes. Controller Request Validator Handler Service
  • 6. Documentation • Use Documentation Tools • Keep Updated • Remove Properties on maintenance phase • Make easy for everyone to read • Test readability with other devs
  • 7. Upon deprecation • Give notice for deprecation • Point out different version or replacement to every method and address that is deprecated
  • 8. Performance tips Performance is also an important consideration. Avoid returning too much data at once. Use caching to avoid repeated queries
  • 9. Last General Tips • have consistency by following web standards and conventions • Paths of endpoints should be consistent • use nouns only since the HTTP methods indicate the action we want to take. • Paths of nested resources should come after the path of the parent resource. • Paths should tell what is returned or manipulated without the need to read extra documentation to understand what it’s doing.