SlideShare a Scribd company logo
BUILDING REST APIS THAT DON’T
SUCK FOR MODERN DAY SPAS
Adewale Abati
ABATI “ACEKYD” ADEWALE
Web Engineer
Community Manager &
Developer Advocate @
Ingressive
Open source Enthusiast
YouTuber
Gamer & Basketballer
WHO AM I?
@acekyd @ace_kyd
BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS
WHAT WE WOULD BE TALKING ABOUT
What are Single Page Applications
How do REST APIs come in
Common Practices for REST API structures.
API Accessibility tips
Documentation tips
Error handling and status codes tips
Differences in building private APIs from experience.
WHAT ARE SINGLE PAGE APPLICATIONS?
A single page application also known as SPA is a web
application or website that interacts with the user by
dynamically rewriting the current page rather than
loading entire new pages from a server.
It does not require page reloading during use by relying on the features
and capabilities of modern web browsers.
WHAT ARE SINGLE PAGE APPLICATIONS?
SINGLE PAGE APPLICATIONS ARE AS A RESULT OF
Modern browsers
JavaScript becoming increasingly powerful
HTML5 capabilities
Heightened focus on user interfaces and experience
COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPLICATIONS
COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPS
…and many more…
HOW DO REST APIS
COME IN?
A RESTful API is a standard pattern for APIs
that use HTTP requests to GET, PUT, POST
and DELETE data.
HOW DO REST APIS COME IN?
Source:https://msdn.microsoft.com/en-us/magazine/dn463786.aspx
API ACCESSIBILITY TIPS
BUILDING AN ACCESSIBLE API
Users should be able to get up and running with a basic
implementation of your API in about 15 minutes
Think in resources for endpoints.
Think nouns not verbs. Leave verbs to request methods.
Same endpoint structure (plural endpoints) - Be consistent
Avoid breaking changes to existing endpoints.
Performance and speed are important.
THINK IN RESOURCES FOR ENDPOINTS
API ACCESSIBILITY TIPS
NOUNS NOT VERBS. LEAVE VERBS FOR REQUEST METHODS
API ACCESSIBILITY TIPS
AVOID BREAKING CHANGES
API ACCESSIBILITY TIPS
DOCUMENTATION BEST PRACTICES
First entry point for users
Include a tutorial or summary of what can be done with
the API
Include example requests and responses
Use generators or tools to create nice documentation.
Provide information on each endpoint.
DOCUMENTATION BEST PRACTICES
DOCUMENTATION BEST PRACTICES
INCLUDE SUMMARY FOR API
The Twilio REST API quickly highlights all the things you
can do with their API. Giving you an idea of the features
available to you at a glance.
DOCUMENTATION BEST PRACTICES
INCLUDE TUTORIALS WHERE POSSIBLE FOR API
DOCUMENTATION BEST PRACTICES
INCLUDE TUTORIALS WHERE POSSIBLE FOR API
DOCUMENTATION BEST PRACTICES
EXAMPLE REQUESTS AND RESPONSES
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
APIDOCjs.com
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
swagger.io
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
https://spectrum.chat/slate
HANDLING ERRORS, RESPONSES & STATUS CODES
HANDLING ERRORS, RESPONSES & STATUS CODES
Validation - Validate everything
Be consistent with your response format.
Use common status codes with responses
2xx (Success category) - 200 Ok, 201 Created, 204 No content
3xx (Redirection category) - 304 Not Modified
4xx (Client Error category) - 400 Bad Request, 401 Unauthorized, 403
Forbidden, 404 Not Found
5xx (Server Error category) - 500 Internal Server Error, 503 Service
Unavailable.
PRIVATE API
BUILDING A PRIVATE API
Look at UI designs before implementing API
Recommended to have an understanding of how the
frontend app works to better know how to present data
Start with authentication before going deep into the API
features when necessary.
Maintain good documentation.
QUESTIONS?@acekyd @ace_kyd

More Related Content

PDF
apidays LIVE Paris - How to build better and consistent APIs at scale by Sami...
apidays
 
PPTX
Api types
Sarah Maddox
 
PDF
Application Programming Interface Implementation For Building Software Applic...
SlideTeam
 
PDF
Introduction to APIs
Camille Baldock
 
PDF
Ottspott by Apidaze @API Days Paris 2015
Luis Borges Quina
 
PPTX
Api application programming interface
Mohit Bishnoi
 
PDF
API as a Growth Tool
3scale
 
PDF
Hybrid Apps, Ionic framework
Oleksandr Telnov
 
apidays LIVE Paris - How to build better and consistent APIs at scale by Sami...
apidays
 
Api types
Sarah Maddox
 
Application Programming Interface Implementation For Building Software Applic...
SlideTeam
 
Introduction to APIs
Camille Baldock
 
Ottspott by Apidaze @API Days Paris 2015
Luis Borges Quina
 
Api application programming interface
Mohit Bishnoi
 
API as a Growth Tool
3scale
 
Hybrid Apps, Ionic framework
Oleksandr Telnov
 

What's hot (20)

PDF
Response Visualizations in Postman
Postman
 
PPTX
On the shoulders of giants Learning About API Design by Looking Backwards
CA API Management
 
PPTX
Angular Universal
Oleksandr Telnov
 
PDF
Building APIs with Node.js and MonogDB
Charlie Key
 
PDF
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays
 
PDF
Top 5 Ways To Increase API Adoption
ProgrammableWeb
 
PDF
APIs for your Business + Stages of the API Lifecycle
3scale
 
PPT
Open APIs and the Semantic Web 2011
John Musser
 
PPTX
Progressive Web Apps
Timmy Kokke
 
PDF
API Architecture
Ryan Kolak
 
PDF
WordCamp Bucharest 2017
Alexandra Anghel
 
PDF
Your API Deserves More Respect: Make It A Product
ProgrammableWeb
 
PDF
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays
 
PDF
apidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays
 
PDF
Android Instant Apps testing
Diana Pinchuk
 
PPTX
API Design Approach
Adrian Gigante
 
PDF
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays
 
PPT
Hybrid app development
Harshul Shah
 
PDF
APIS for Startups - Running your Business Inside Out
3scale
 
PPT
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
Ayushman Jain
 
Response Visualizations in Postman
Postman
 
On the shoulders of giants Learning About API Design by Looking Backwards
CA API Management
 
Angular Universal
Oleksandr Telnov
 
Building APIs with Node.js and MonogDB
Charlie Key
 
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays
 
Top 5 Ways To Increase API Adoption
ProgrammableWeb
 
APIs for your Business + Stages of the API Lifecycle
3scale
 
Open APIs and the Semantic Web 2011
John Musser
 
Progressive Web Apps
Timmy Kokke
 
API Architecture
Ryan Kolak
 
WordCamp Bucharest 2017
Alexandra Anghel
 
Your API Deserves More Respect: Make It A Product
ProgrammableWeb
 
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays
 
apidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays
 
Android Instant Apps testing
Diana Pinchuk
 
API Design Approach
Adrian Gigante
 
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays
 
Hybrid app development
Harshul Shah
 
APIS for Startups - Running your Business Inside Out
3scale
 
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
Ayushman Jain
 
Ad

Similar to Building REST APIs that don't suck for modern day SPAs (20)

PDF
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
PDF
Architect's Guide to Building an API Program
clatimer
 
PDF
Building A Great API - Evan Cooke, Cloudstock, December 2010
Twilio Inc
 
PDF
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
PDF
Building Successful APIs Overnight - Orlando K - Codemotion Rome 2015
Codemotion
 
PDF
Designing Usable APIs featuring Forrester Research, Inc.
CA API Management
 
PDF
zendframework2 restful
tom_li
 
PDF
Создание API, которое полюбят разработчики. Глубокое погружение
SQALab
 
PPTX
Api crash
Luis Goldster
 
PPTX
Api crash
Harry Potter
 
PPTX
Api crash
Fraboni Ec
 
PPTX
Api crash
Tony Nguyen
 
PPTX
Api crash
James Wong
 
PPTX
Api crash
Hoang Nguyen
 
PPTX
Api crash
Young Alista
 
DOCX
Fundamental Essentials for API Design
Michael James Cyrus
 
DOCX
Fundamental essentials for api design
Michael James Cyrus
 
DOCX
Fundamental essentials for api design
Michael James Cyrus
 
PDF
REST API Recommendations
Jeelani Shaik
 
PPTX
API Design- Best Practices
Prakash Bhandari
 
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
Architect's Guide to Building an API Program
clatimer
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Twilio Inc
 
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
Building Successful APIs Overnight - Orlando K - Codemotion Rome 2015
Codemotion
 
Designing Usable APIs featuring Forrester Research, Inc.
CA API Management
 
zendframework2 restful
tom_li
 
Создание API, которое полюбят разработчики. Глубокое погружение
SQALab
 
Api crash
Luis Goldster
 
Api crash
Harry Potter
 
Api crash
Fraboni Ec
 
Api crash
Tony Nguyen
 
Api crash
James Wong
 
Api crash
Hoang Nguyen
 
Api crash
Young Alista
 
Fundamental Essentials for API Design
Michael James Cyrus
 
Fundamental essentials for api design
Michael James Cyrus
 
Fundamental essentials for api design
Michael James Cyrus
 
REST API Recommendations
Jeelani Shaik
 
API Design- Best Practices
Prakash Bhandari
 
Ad

More from Abati Adewale (16)

PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
Web performance as rocket science
Abati Adewale
 
PDF
World Festival - Reimagining web development in your browser.pdf
Abati Adewale
 
PDF
Reimagining web development in your browser.pdf
Abati Adewale
 
PDF
Supercharging your career with Social currency - OSCAFEST 2022.pdf
Abati Adewale
 
PDF
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
Abati Adewale
 
PDF
Improving developer collaboration with CodeSandbox
Abati Adewale
 
PDF
A look into open source in nigeria
Abati Adewale
 
PDF
Introduction to Open Source - What, Why and How to Contribute
Abati Adewale
 
PDF
Open source - An enabler for the next billion users
Abati Adewale
 
PPTX
Finding your place - University of Ilorin
Abati Adewale
 
PPTX
Gathered App Demo Slides
Abati Adewale
 
PDF
Practical Approach To Contributing To Open Source - Forloop Ibadan
Abati Adewale
 
PPT
Meet Alat.ng - Product Hunt Lagos
Abati Adewale
 
PDF
Design Considerations For Side Projects - Product Hunt Lagos
Abati Adewale
 
PDF
Ajo Africa - Product Hunt Lagos
Abati Adewale
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Web performance as rocket science
Abati Adewale
 
World Festival - Reimagining web development in your browser.pdf
Abati Adewale
 
Reimagining web development in your browser.pdf
Abati Adewale
 
Supercharging your career with Social currency - OSCAFEST 2022.pdf
Abati Adewale
 
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
Abati Adewale
 
Improving developer collaboration with CodeSandbox
Abati Adewale
 
A look into open source in nigeria
Abati Adewale
 
Introduction to Open Source - What, Why and How to Contribute
Abati Adewale
 
Open source - An enabler for the next billion users
Abati Adewale
 
Finding your place - University of Ilorin
Abati Adewale
 
Gathered App Demo Slides
Abati Adewale
 
Practical Approach To Contributing To Open Source - Forloop Ibadan
Abati Adewale
 
Meet Alat.ng - Product Hunt Lagos
Abati Adewale
 
Design Considerations For Side Projects - Product Hunt Lagos
Abati Adewale
 
Ajo Africa - Product Hunt Lagos
Abati Adewale
 

Recently uploaded (20)

PDF
Become an Agentblazer Champion Challenge
Dele Amefo
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PDF
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PPTX
TestNG for Java Testing and Automation testing
ssuser0213cb
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Become an Agentblazer Champion Challenge
Dele Amefo
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
oapresentation.pptx
mehatdhavalrajubhai
 
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
TestNG for Java Testing and Automation testing
ssuser0213cb
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 

Building REST APIs that don't suck for modern day SPAs

  • 1. BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS Adewale Abati
  • 2. ABATI “ACEKYD” ADEWALE Web Engineer Community Manager & Developer Advocate @ Ingressive Open source Enthusiast YouTuber Gamer & Basketballer WHO AM I? @acekyd @ace_kyd
  • 3. BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS WHAT WE WOULD BE TALKING ABOUT What are Single Page Applications How do REST APIs come in Common Practices for REST API structures. API Accessibility tips Documentation tips Error handling and status codes tips Differences in building private APIs from experience.
  • 4. WHAT ARE SINGLE PAGE APPLICATIONS? A single page application also known as SPA is a web application or website that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server. It does not require page reloading during use by relying on the features and capabilities of modern web browsers.
  • 5. WHAT ARE SINGLE PAGE APPLICATIONS? SINGLE PAGE APPLICATIONS ARE AS A RESULT OF Modern browsers JavaScript becoming increasingly powerful HTML5 capabilities Heightened focus on user interfaces and experience
  • 6. COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPLICATIONS COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPS …and many more…
  • 7. HOW DO REST APIS COME IN? A RESTful API is a standard pattern for APIs that use HTTP requests to GET, PUT, POST and DELETE data.
  • 8. HOW DO REST APIS COME IN? Source:https://msdn.microsoft.com/en-us/magazine/dn463786.aspx
  • 9. API ACCESSIBILITY TIPS BUILDING AN ACCESSIBLE API Users should be able to get up and running with a basic implementation of your API in about 15 minutes Think in resources for endpoints. Think nouns not verbs. Leave verbs to request methods. Same endpoint structure (plural endpoints) - Be consistent Avoid breaking changes to existing endpoints. Performance and speed are important.
  • 10. THINK IN RESOURCES FOR ENDPOINTS API ACCESSIBILITY TIPS
  • 11. NOUNS NOT VERBS. LEAVE VERBS FOR REQUEST METHODS API ACCESSIBILITY TIPS
  • 12. AVOID BREAKING CHANGES API ACCESSIBILITY TIPS
  • 13. DOCUMENTATION BEST PRACTICES First entry point for users Include a tutorial or summary of what can be done with the API Include example requests and responses Use generators or tools to create nice documentation. Provide information on each endpoint. DOCUMENTATION BEST PRACTICES
  • 14. DOCUMENTATION BEST PRACTICES INCLUDE SUMMARY FOR API The Twilio REST API quickly highlights all the things you can do with their API. Giving you an idea of the features available to you at a glance.
  • 15. DOCUMENTATION BEST PRACTICES INCLUDE TUTORIALS WHERE POSSIBLE FOR API
  • 16. DOCUMENTATION BEST PRACTICES INCLUDE TUTORIALS WHERE POSSIBLE FOR API
  • 17. DOCUMENTATION BEST PRACTICES EXAMPLE REQUESTS AND RESPONSES
  • 18. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES APIDOCjs.com
  • 19. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES swagger.io
  • 20. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES https://spectrum.chat/slate
  • 21. HANDLING ERRORS, RESPONSES & STATUS CODES HANDLING ERRORS, RESPONSES & STATUS CODES Validation - Validate everything Be consistent with your response format. Use common status codes with responses 2xx (Success category) - 200 Ok, 201 Created, 204 No content 3xx (Redirection category) - 304 Not Modified 4xx (Client Error category) - 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found 5xx (Server Error category) - 500 Internal Server Error, 503 Service Unavailable.
  • 22. PRIVATE API BUILDING A PRIVATE API Look at UI designs before implementing API Recommended to have an understanding of how the frontend app works to better know how to present data Start with authentication before going deep into the API features when necessary. Maintain good documentation.