SlideShare a Scribd company logo
RESTfulAPI Basics
using Laravel 5+
/me
● John Dave Decano aka Dave
● Juwai Team
● Doing freelance since 2009
● No Formal Education on CS or IT
● Self Taught Programmer
● http://github.com/johndavedecano
● http://odesk.com/odeskfreelancer
● http://johndavedecano.me
What is restfulAPI?
● REST - Representational State Transfer
● REST is an architecture style for designing networked applications.
● In many ways, the World Wide Web itself, based on HTTP, can be viewed as a REST-
based architecture.
● RESTful API uses versioning. e.g POST /V1/todos/
● RESTful API explicitly take advantage of HTTP methodologies defined by the RFC 2616
protocol. They simply use "PUT" to change the state of or update a resource, which can be
an object, file or block; "GET" to retrieve a resource; POST" to create that resource; and
"DELETE" to remove it.
● Restful API uses HTTP Headers add information about the request and the response.
● Restful API uses HTTP Status Codes Correctly.
● Restful API is stateless.
● Restful API commonly use JSON or XML as a form of response.
● Each API request returns a subsequent API response.
What is restfulAPI?
● REST - Representational State Transfer
● REST is an architecture style for designing networked applications.
● In many ways, the World Wide Web itself, based on HTTP, can be
viewed as a REST-based architecture.
● RESTful API uses HTTP for all four CRUD
(Create/Read/Update/Delete) operations.
● Each request returns a subsequent response.
● HTTP Verbs – POST, GET, UPDATE, PUT, PATCH, DELETE
● HTTP Headers – Content-Type, Content-Length etc.
● Commonly used by Mobile Applications and Single Paged Apps.
● Commonly use JSON or XML as a form of response.
A stateless protocol does not require the server to retain information or
status about each user for the duration of multiple requests.
Requests are made up of a verb (POST, in this example), headers that describe the
message, and a body (Hello World, in this example).
The request is a message that describes what you want the server to accomplish.
Likewise, the response consists of three pieces: a status code (200), headers
describing the response and the body itself.
HTTP Verbs describe the type of operation:
GET: Retrieve a resource
POST: Create a resource
PUT: Update a resource
DELETE: Delete a resource
On the Web, the most common verb is GET. This is because the main purpose of a
Web page's function is to request different resources that make up a page. In REST-
based APIs, we leverage these verbs to describe the types of operations we want.
Hello Laravel
● Taylor Otwell
● Open Source
● Well Documented
● Active Community
● Lots of Jobs
● Easy Grasp
How about the security?
● REST api can be exposed to the public. They usually call it as Public APIs
● You can use OAUTH, HTTP Basic or JWT.
● OAuth is an open standard for authorization, commonly used as a way for Internet
users to log in to third party websites using their Google, Facebook, Microsoft,
Twitter, One Network, etc. accounts without exposing their password.
● HTTP Basic - In the context of an HTTP transaction basic access authentication is a
method for an HTTP user agent to provide a user name and password when making
a request.
● JSON Web Tokens are an open, industry standard RFC 7519 method for
representing claims securely between two parties.
TALK IS CHEAP
SHOW ME THE CODE
You will learn how to:
● Install LARAVEL
● Create URL Routes
● Create Migrations
● Create Seeder
● Create Models
● Create Controllers
● Create Requests Classes
● Create Validate Data
Questions?

More Related Content

What's hot (20)

PDF
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
PDF
Laravel Restful API and AngularJS
Blake Newman
 
PDF
ACL in CodeIgniter
mirahman
 
ODP
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
vvaswani
 
PDF
JSON REST API for WordPress
Taylor Lovett
 
PDF
Web develop in flask
Jim Yeh
 
PDF
Getting Started-with-Laravel
Mindfire Solutions
 
PDF
Consuming RESTful services in PHP
Zoran Jeremic
 
PPTX
REST API Best Practices & Implementing in Codeigniter
Sachin G Kulkarni
 
PPTX
40+ tips to use Postman more efficiently
postmanclient
 
PPTX
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
Cisco DevNet
 
PPTX
Day01 api
ABDEL RAHMAN KARIM
 
PDF
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
elliando dias
 
PPTX
Designing CakePHP plugins for consuming APIs
Neil Crookes
 
PDF
Understanding and testing restful web services
mwinteringham
 
PDF
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
Caldera Labs
 
PDF
Your First Scala Web Application using Play 2.1
Matthew Barlocker
 
PDF
JWT - Sécurisez vos APIs
André Tapia
 
PDF
Laravel 5 In Depth
Kirk Bushell
 
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
Laravel Restful API and AngularJS
Blake Newman
 
ACL in CodeIgniter
mirahman
 
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
vvaswani
 
JSON REST API for WordPress
Taylor Lovett
 
Web develop in flask
Jim Yeh
 
Getting Started-with-Laravel
Mindfire Solutions
 
Consuming RESTful services in PHP
Zoran Jeremic
 
REST API Best Practices & Implementing in Codeigniter
Sachin G Kulkarni
 
40+ tips to use Postman more efficiently
postmanclient
 
DEVNET-1001 Coding 101: How to Call REST APIs from a REST Client and Python
Cisco DevNet
 
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
elliando dias
 
Designing CakePHP plugins for consuming APIs
Neil Crookes
 
Understanding and testing restful web services
mwinteringham
 
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
Caldera Labs
 
Your First Scala Web Application using Play 2.1
Matthew Barlocker
 
JWT - Sécurisez vos APIs
André Tapia
 
Laravel 5 In Depth
Kirk Bushell
 

Similar to REST API Laravel (20)

PPTX
Restful api
Anurag Srivastava
 
PDF
Building restful apis with laravel
Mindfire LLC
 
PDF
API Basics
Ritul Chaudhary
 
PPTX
Rest WebAPI with OData
Mahek Merchant
 
PDF
What are restful web services?
Aparna Sharma
 
PDF
Introduction to REST - REST Basics - JSON
Matrix823409
 
PDF
Why Laravel is the Best Choice for Developing RESTful APIs?
Acquaint Softtech Private Limited
 
PDF
Rest api titouan benoit
Titouan BENOIT
 
PDF
Restful风格ž„web服务架构
Benjamin Tan
 
PPT
Understanding REST
Nitin Pande
 
PDF
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
PPTX
Api crash
Hoang Nguyen
 
PPTX
Api crash
Luis Goldster
 
PPTX
Api crash
Harry Potter
 
PPTX
Api crash
Fraboni Ec
 
PPTX
Api crash
Tony Nguyen
 
PPTX
Api crash
Young Alista
 
PPTX
Api crash
James Wong
 
PPTX
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
Restful api
Anurag Srivastava
 
Building restful apis with laravel
Mindfire LLC
 
API Basics
Ritul Chaudhary
 
Rest WebAPI with OData
Mahek Merchant
 
What are restful web services?
Aparna Sharma
 
Introduction to REST - REST Basics - JSON
Matrix823409
 
Why Laravel is the Best Choice for Developing RESTful APIs?
Acquaint Softtech Private Limited
 
Rest api titouan benoit
Titouan BENOIT
 
Restful风格ž„web服务架构
Benjamin Tan
 
Understanding REST
Nitin Pande
 
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
Api crash
Hoang Nguyen
 
Api crash
Luis Goldster
 
Api crash
Harry Potter
 
Api crash
Fraboni Ec
 
Api crash
Tony Nguyen
 
Api crash
Young Alista
 
Api crash
James Wong
 
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
Ad

Recently uploaded (20)

PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Ad

REST API Laravel

  • 2. /me ● John Dave Decano aka Dave ● Juwai Team ● Doing freelance since 2009 ● No Formal Education on CS or IT ● Self Taught Programmer ● http://github.com/johndavedecano ● http://odesk.com/odeskfreelancer ● http://johndavedecano.me
  • 3. What is restfulAPI? ● REST - Representational State Transfer ● REST is an architecture style for designing networked applications. ● In many ways, the World Wide Web itself, based on HTTP, can be viewed as a REST- based architecture. ● RESTful API uses versioning. e.g POST /V1/todos/ ● RESTful API explicitly take advantage of HTTP methodologies defined by the RFC 2616 protocol. They simply use "PUT" to change the state of or update a resource, which can be an object, file or block; "GET" to retrieve a resource; POST" to create that resource; and "DELETE" to remove it. ● Restful API uses HTTP Headers add information about the request and the response. ● Restful API uses HTTP Status Codes Correctly. ● Restful API is stateless. ● Restful API commonly use JSON or XML as a form of response. ● Each API request returns a subsequent API response.
  • 4. What is restfulAPI? ● REST - Representational State Transfer ● REST is an architecture style for designing networked applications. ● In many ways, the World Wide Web itself, based on HTTP, can be viewed as a REST-based architecture. ● RESTful API uses HTTP for all four CRUD (Create/Read/Update/Delete) operations. ● Each request returns a subsequent response. ● HTTP Verbs – POST, GET, UPDATE, PUT, PATCH, DELETE ● HTTP Headers – Content-Type, Content-Length etc. ● Commonly used by Mobile Applications and Single Paged Apps. ● Commonly use JSON or XML as a form of response.
  • 5. A stateless protocol does not require the server to retain information or status about each user for the duration of multiple requests.
  • 6. Requests are made up of a verb (POST, in this example), headers that describe the message, and a body (Hello World, in this example). The request is a message that describes what you want the server to accomplish. Likewise, the response consists of three pieces: a status code (200), headers describing the response and the body itself. HTTP Verbs describe the type of operation: GET: Retrieve a resource POST: Create a resource PUT: Update a resource DELETE: Delete a resource On the Web, the most common verb is GET. This is because the main purpose of a Web page's function is to request different resources that make up a page. In REST- based APIs, we leverage these verbs to describe the types of operations we want.
  • 7. Hello Laravel ● Taylor Otwell ● Open Source ● Well Documented ● Active Community ● Lots of Jobs ● Easy Grasp
  • 8. How about the security? ● REST api can be exposed to the public. They usually call it as Public APIs ● You can use OAUTH, HTTP Basic or JWT. ● OAuth is an open standard for authorization, commonly used as a way for Internet users to log in to third party websites using their Google, Facebook, Microsoft, Twitter, One Network, etc. accounts without exposing their password. ● HTTP Basic - In the context of an HTTP transaction basic access authentication is a method for an HTTP user agent to provide a user name and password when making a request. ● JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
  • 9. TALK IS CHEAP SHOW ME THE CODE
  • 10. You will learn how to: ● Install LARAVEL ● Create URL Routes ● Create Migrations ● Create Seeder ● Create Models ● Create Controllers ● Create Requests Classes ● Create Validate Data