SlideShare une entreprise Scribd logo
1  sur  14
#RasanRasan
Technology #2
RESTWeb Service & LUMEN
with RoesWibowo
Tentang Roes
Roes Wibowo
InformationTechnology, 22, 2015
DevOps Sleekr
Fb: http://fb.me/roeswb
Email: roeswb@gmail.com
More: https://bit.ly/roeswibowo
REST & LUMEN
1. Web Service & Web API
2. RESTful APIs
3. Insomnia REST
4. Lumen Micro Framework
5. Demo
1.Web Service & Web API
• Web Service andWeb API are different
• Web Service covers:
– XML-RPC (XML)
– SOAP &WSDL(XML)
– GraphQL (JSON)
– REST (JSON)
2. RESTful APIs
a. HTTPVerb
b. RESTful URL
c. Code response
d. JSON Format
2.a. HTTPVerb
- Method GET (get resources)
- Method POST (create new resource)
- Method PUT (update/replace entire resource)
- Method PATCH (update part of resource)
- Method DELETE (delete resource)
2.b. RESTful URL
- Method GET (get resources)
- https://domain.com/lessons
- https://domain.com/lessons?category=1&category=2
- https://domain.com/lessons?search=rasanrasan
- https://domain.com/lessons/1
- Method POST (create new resource)
- https://domain.com/lessons
- Method PUT (update/replace entire resource)
- https://domain.com/lessons/2
- Method PATCH (update part of resource)
- https://domain.com/lessons/3
- Method DELETE (delete resource)
- https://domain.com/lessons/4
2.c. Code Response
- Method GET (get resources)
- 200: resource found
- Method POST (create new resource)
- 201: resource created
- Method PUT (update/replace entire resource)
- 200: resource updated
- Method PATCH (update part of resource)
- 200: resource updated
- Method DELETE (delete resource)
- 200: resource deleted
- General error code
- 404: resource not found
- 422: unprocessable entity
- 500: internal server error
2.d. JSON Format
- Response method GET
2.d. JSON Format
- Response method POST, PUT, PATCH
- Response method DELETE code response with blank message
3. Insomnia REST
- Website: https://insomnia.rest
- Open source & Premium account
3. Lumen Micro Framework
- Website: https://lumen.laravel.com
- Micro-framework of Laravel
- PHP Composer based
- Follows PSR
3. Lumen Framework
Requirements:
- PHP > 7.1: https://www.apachefriends.org/xampp-files/7.2.3/xampp-
win32-7.2.3-0-VC15-installer.exe
- Composer: https://getcomposer.org/Composer-Setup.exe
- Git: https://git-scm.com/download/win
How to install:
- Open terminal/console and run:
composer create-project --prefer-dist laravel/lumen rest –vvv
- Create new database
- Change configuration database in .env file
4. Demo
Github Project: https://github.com/RoesWibowo/REST-Lumen
Thank you! 

Contenu connexe

Similaire à REST & Lumen

RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HPRoni Schuetz
 
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...Nguyen Duc Phu
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicehazzaz
 
Webservices Testing PPT.pdf
Webservices Testing PPT.pdfWebservices Testing PPT.pdf
Webservices Testing PPT.pdfAbhishekDhotre4
 
Pragmatic REST APIs
Pragmatic REST APIsPragmatic REST APIs
Pragmatic REST APIsamesar0
 
07 restful webservices design
07 restful webservices design07 restful webservices design
07 restful webservices designAhmed Elbassel
 
HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용SangJin Kang
 
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.
Drupal South 2015: Introduction to Web Services.  Services in Drupal 8.Drupal South 2015: Introduction to Web Services.  Services in Drupal 8.
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.TechnocratAu
 
Introduction to Google APIs
Introduction to Google APIsIntroduction to Google APIs
Introduction to Google APIsSiva Arunachalam
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCマイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCdisc99_
 
Learn Spring Boot With Bisky - 3.pptx
Learn Spring Boot With Bisky - 3.pptxLearn Spring Boot With Bisky - 3.pptx
Learn Spring Boot With Bisky - 3.pptxMarshallChabaga
 
Use drupal 8 as a framework the romance recalibration
Use drupal 8 as a framework   the romance recalibrationUse drupal 8 as a framework   the romance recalibration
Use drupal 8 as a framework the romance recalibrationKevin Wenger
 

Similaire à REST & Lumen (20)

RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
 
L18 REST API Design
L18 REST API DesignL18 REST API Design
L18 REST API Design
 
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-service
 
Webservices Testing PPT.pdf
Webservices Testing PPT.pdfWebservices Testing PPT.pdf
Webservices Testing PPT.pdf
 
Pragmatic REST APIs
Pragmatic REST APIsPragmatic REST APIs
Pragmatic REST APIs
 
07 restful webservices design
07 restful webservices design07 restful webservices design
07 restful webservices design
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용
 
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.
Drupal South 2015: Introduction to Web Services.  Services in Drupal 8.Drupal South 2015: Introduction to Web Services.  Services in Drupal 8.
Drupal South 2015: Introduction to Web Services. Services in Drupal 8.
 
Rest web services
Rest web servicesRest web services
Rest web services
 
Introduction to Google APIs
Introduction to Google APIsIntroduction to Google APIs
Introduction to Google APIs
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCマイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPC
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Learn Spring Boot With Bisky - 3.pptx
Learn Spring Boot With Bisky - 3.pptxLearn Spring Boot With Bisky - 3.pptx
Learn Spring Boot With Bisky - 3.pptx
 
Rest with Spring
Rest with SpringRest with Spring
Rest with Spring
 
Apex REST
Apex RESTApex REST
Apex REST
 
Why Restful
Why RestfulWhy Restful
Why Restful
 
Why do you need REST
Why do you need RESTWhy do you need REST
Why do you need REST
 
Use drupal 8 as a framework the romance recalibration
Use drupal 8 as a framework   the romance recalibrationUse drupal 8 as a framework   the romance recalibration
Use drupal 8 as a framework the romance recalibration
 

Dernier

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Dernier (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

REST & Lumen

  • 2. Tentang Roes Roes Wibowo InformationTechnology, 22, 2015 DevOps Sleekr Fb: http://fb.me/roeswb Email: roeswb@gmail.com More: https://bit.ly/roeswibowo
  • 3. REST & LUMEN 1. Web Service & Web API 2. RESTful APIs 3. Insomnia REST 4. Lumen Micro Framework 5. Demo
  • 4. 1.Web Service & Web API • Web Service andWeb API are different • Web Service covers: – XML-RPC (XML) – SOAP &WSDL(XML) – GraphQL (JSON) – REST (JSON)
  • 5. 2. RESTful APIs a. HTTPVerb b. RESTful URL c. Code response d. JSON Format
  • 6. 2.a. HTTPVerb - Method GET (get resources) - Method POST (create new resource) - Method PUT (update/replace entire resource) - Method PATCH (update part of resource) - Method DELETE (delete resource)
  • 7. 2.b. RESTful URL - Method GET (get resources) - https://domain.com/lessons - https://domain.com/lessons?category=1&category=2 - https://domain.com/lessons?search=rasanrasan - https://domain.com/lessons/1 - Method POST (create new resource) - https://domain.com/lessons - Method PUT (update/replace entire resource) - https://domain.com/lessons/2 - Method PATCH (update part of resource) - https://domain.com/lessons/3 - Method DELETE (delete resource) - https://domain.com/lessons/4
  • 8. 2.c. Code Response - Method GET (get resources) - 200: resource found - Method POST (create new resource) - 201: resource created - Method PUT (update/replace entire resource) - 200: resource updated - Method PATCH (update part of resource) - 200: resource updated - Method DELETE (delete resource) - 200: resource deleted - General error code - 404: resource not found - 422: unprocessable entity - 500: internal server error
  • 9. 2.d. JSON Format - Response method GET
  • 10. 2.d. JSON Format - Response method POST, PUT, PATCH - Response method DELETE code response with blank message
  • 11. 3. Insomnia REST - Website: https://insomnia.rest - Open source & Premium account
  • 12. 3. Lumen Micro Framework - Website: https://lumen.laravel.com - Micro-framework of Laravel - PHP Composer based - Follows PSR
  • 13. 3. Lumen Framework Requirements: - PHP > 7.1: https://www.apachefriends.org/xampp-files/7.2.3/xampp- win32-7.2.3-0-VC15-installer.exe - Composer: https://getcomposer.org/Composer-Setup.exe - Git: https://git-scm.com/download/win How to install: - Open terminal/console and run: composer create-project --prefer-dist laravel/lumen rest –vvv - Create new database - Change configuration database in .env file
  • 14. 4. Demo Github Project: https://github.com/RoesWibowo/REST-Lumen Thank you! 