SlideShare a Scribd company logo
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 apigility
Christian 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 practices
WSO2
 
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
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
Tatiana Al-Chueyr
 
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 APIs
Tom Johnson
 
API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0
Fabrizio Ferri-Benedetti
 
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
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
Er. Prashant Veer Singh
 
Best Practices in Api Design
Best Practices in Api DesignBest Practices in Api Design
Best Practices in Api Design
Muhammad Aamir ...
 
flask.pptx
flask.pptxflask.pptx
flask.pptx
asif290119
 
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
Tom 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 solutions
Bhakti Mehta
 
REST based API
REST based APIREST based API
REST based API
ijtsrd
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
SharePointRadi
 
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
Tom 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
 
Standards of rest api
Standards of rest apiStandards of rest api
Standards of rest api
Maýur Chourasiya
 
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
Apigee | 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 Nhu
apidays
 

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

Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 

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