SlideShare a Scribd company logo
1 of 16
Download to read offline
API Design
William Huan Le
API Design
● API (Application Programming Interface)
○ API is a software interface that allows two applications to
interact with each other
○ API provides product or service to communicate with other
products and services without having to know how they’re
implemented
○ Restful API
● API document
○ Swagger
● Log
○ Log4j
○ Logback
Restful API
● RESTful API is built on REST’s architecture and principles
● RESTful API is an architectural style that uses HTTP requests to access and use data
Restful API design
1. Request API endpoint (URI):
○ https://mybusiness.googleapis.com/v4/accounts/{accountId}/loca
tions/{locationId}/localPosts
2. Request Methods
○ GET/ PUT/ POST/ DELETE/ …
3. Request/Response Headers
4. Request/Response Message body
5. Response HTTP Status Code
Restful API design API endpoint (URI)
URI format:
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts
1. Slash (/) must be used to indicate a hierarchical relationship, forward slash (/) should not be included in URIs
2. Hyphens (-) should be used to improve the readability of URIs
3. Underscores (_) should not be used in URIs
4. Lowercase letters should be preferred in URI paths
5. File extensions should not be included in URIs
Restful API design API endpoint (URI)
URI Authority:
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts
1. Consistent subdomain names should be used for your APIs
2. Consistent subdomain names should be used for your client developer portal
Restful API design API endpoint (URI)
Path design:
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts
1. A singular noun should be used for document names
2. A plural noun should be used for collection names
3. A plural noun should be used for store names
4. A verb or verb phrase should be used for controller names
5. Variable path segments may be substituted with identity-based values
6. CRUD function names should not be used in URIs
Restful API design API endpoint (URI)
URI Query Design
1. The query component of a URI may be used to filter collections or stores
2. The query component of a URI should be used to paginate collection or store results
Restful API design Request Methods
1. GET must be used to retrieve a representation of a resource
2. HEAD should be used to retrieve response headers
3. PUT must be used to both insert and update a stored resource
4. POST must be used to create a new resource in a collection
5. DELETE must be used to remove a resource from its parent
Restful API design Request/ response Headers
● Content-Type must be used
○ Content-Type Identifies the entity body’s
media type
● Content-Length should be used
○ The size (in bytes) of the entity body
Restful API design Request/ response Message Body
1. Message Body Format
a. JSON should be supported for resource representation
b. JSON must be well-formed
Restful API design Response HTTP Status Code
Ranges
1. 1xx: Informational Communicates transfer protocol-level information.
2. 2xx: Success Indicates that the client’s request was accepted
successfully.
3. 3xx: Redirection Indicates that the client must take some additional
action in order to complete their request.
4. 4xx: Client Error This category of error status codes points the finger at
clients.
5. 5xx: Server Error The server takes responsibility for these error status
codes
Ref:
1. https://developers.google.com/search/docs/crawling-indexing/http-network-errors
2. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200
Swagger
What is an API Documentation/
Specification/ Definition?
an API specification explains how
the API behaves and what to expect
from the API
Swagger
● Swagger UI
https://www.baeldung.com/swagger-2
-documentation-for-spring-rest-api
● Editor
https://editor.swagger.io/
Logback
https://www.baeldung.com/spring-boot-logging
Assignment
1. What is web service? REST? SOAP? Restful?
2. What are the advantages and disadvantages of rest api, web service?
3. Swagger editor (schema format, define api, define object)
4. Logback
5. Use restful principle to implement API use restful principle
5.1. Login ADMIN/ USER role
5.2. ADMIN: CRUD (create, read, update, delete)
5.3. USER: read only (get all, get detail)
5.4. Use logback to log request/ response
5.5. Expose API Swagger Document

More Related Content

Similar to API_Design_Rest_Princple.pdf

Build your APIs with apigility
Build your APIs with apigilityBuild your APIs with apigility
Build your APIs with apigilityChristian Varela
 
How to design a good REST API: Tools, techniques and best practices
How to design a good REST API: Tools, techniques and best practicesHow to design a good REST API: Tools, techniques and best practices
How to design a good REST API: Tools, techniques and best practicesWSO2
 
How to design a good rest api tools, techniques and best practices.
How to design a good rest api  tools, techniques and best practices.How to design a good rest api  tools, techniques and best practices.
How to design a good rest api tools, techniques and best practices.Nuwan Dias
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design PrinciplesAnji Beeravalli
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIsTom Johnson
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Mario Cardinal
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsBhakti Mehta
 
REST based API
REST based APIREST based API
REST based APIijtsrd
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure ADSharePointRadi
 
O reilly sacon2018nyc - restful api design - master - v1.0
O reilly sacon2018nyc - restful api design - master - v1.0O reilly sacon2018nyc - restful api design - master - v1.0
O reilly sacon2018nyc - restful api design - master - v1.0Tom Hofte
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...Jitendra Bafna
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsApigee | Google Cloud
 
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
 

Similar to API_Design_Rest_Princple.pdf (20)

Build your APIs with apigility
Build your APIs with apigilityBuild your APIs with apigility
Build your APIs with apigility
 
How to design a good REST API: Tools, techniques and best practices
How to design a good REST API: Tools, techniques and best practicesHow to design a good REST API: Tools, techniques and best practices
How to design a good REST API: Tools, techniques and best practices
 
How to design a good rest api tools, techniques and best practices.
How to design a good rest api  tools, techniques and best practices.How to design a good rest api  tools, techniques and best practices.
How to design a good rest api tools, techniques and best practices.
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design Principles
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIs
 
API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Best Practices in Api Design
Best Practices in Api DesignBest Practices in Api Design
Best Practices in Api Design
 
flask.pptx
flask.pptxflask.pptx
flask.pptx
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
 
REST based API
REST based APIREST based API
REST based API
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
O reilly sacon2018nyc - restful api design - master - v1.0
O reilly sacon2018nyc - restful api design - master - v1.0O reilly sacon2018nyc - restful api design - master - v1.0
O reilly sacon2018nyc - restful api design - master - v1.0
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
Standards of rest api
Standards of rest apiStandards of rest api
Standards of rest api
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 
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
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 

API_Design_Rest_Princple.pdf

  • 2. API Design ● API (Application Programming Interface) ○ API is a software interface that allows two applications to interact with each other ○ API provides product or service to communicate with other products and services without having to know how they’re implemented ○ Restful API ● API document ○ Swagger ● Log ○ Log4j ○ Logback
  • 3. Restful API ● RESTful API is built on REST’s architecture and principles ● RESTful API is an architectural style that uses HTTP requests to access and use data
  • 4. Restful API design 1. Request API endpoint (URI): ○ https://mybusiness.googleapis.com/v4/accounts/{accountId}/loca tions/{locationId}/localPosts 2. Request Methods ○ GET/ PUT/ POST/ DELETE/ … 3. Request/Response Headers 4. Request/Response Message body 5. Response HTTP Status Code
  • 5. Restful API design API endpoint (URI) URI format: https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts 1. Slash (/) must be used to indicate a hierarchical relationship, forward slash (/) should not be included in URIs 2. Hyphens (-) should be used to improve the readability of URIs 3. Underscores (_) should not be used in URIs 4. Lowercase letters should be preferred in URI paths 5. File extensions should not be included in URIs
  • 6. Restful API design API endpoint (URI) URI Authority: https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts 1. Consistent subdomain names should be used for your APIs 2. Consistent subdomain names should be used for your client developer portal
  • 7. Restful API design API endpoint (URI) Path design: https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts 1. A singular noun should be used for document names 2. A plural noun should be used for collection names 3. A plural noun should be used for store names 4. A verb or verb phrase should be used for controller names 5. Variable path segments may be substituted with identity-based values 6. CRUD function names should not be used in URIs
  • 8. Restful API design API endpoint (URI) URI Query Design 1. The query component of a URI may be used to filter collections or stores 2. The query component of a URI should be used to paginate collection or store results
  • 9. Restful API design Request Methods 1. GET must be used to retrieve a representation of a resource 2. HEAD should be used to retrieve response headers 3. PUT must be used to both insert and update a stored resource 4. POST must be used to create a new resource in a collection 5. DELETE must be used to remove a resource from its parent
  • 10. Restful API design Request/ response Headers ● Content-Type must be used ○ Content-Type Identifies the entity body’s media type ● Content-Length should be used ○ The size (in bytes) of the entity body
  • 11. Restful API design Request/ response Message Body 1. Message Body Format a. JSON should be supported for resource representation b. JSON must be well-formed
  • 12. Restful API design Response HTTP Status Code Ranges 1. 1xx: Informational Communicates transfer protocol-level information. 2. 2xx: Success Indicates that the client’s request was accepted successfully. 3. 3xx: Redirection Indicates that the client must take some additional action in order to complete their request. 4. 4xx: Client Error This category of error status codes points the finger at clients. 5. 5xx: Server Error The server takes responsibility for these error status codes Ref: 1. https://developers.google.com/search/docs/crawling-indexing/http-network-errors 2. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200
  • 13. Swagger What is an API Documentation/ Specification/ Definition? an API specification explains how the API behaves and what to expect from the API
  • 16. Assignment 1. What is web service? REST? SOAP? Restful? 2. What are the advantages and disadvantages of rest api, web service? 3. Swagger editor (schema format, define api, define object) 4. Logback 5. Use restful principle to implement API use restful principle 5.1. Login ADMIN/ USER role 5.2. ADMIN: CRUD (create, read, update, delete) 5.3. USER: read only (get all, get detail) 5.4. Use logback to log request/ response 5.5. Expose API Swagger Document