API All the Things!
OpenWest 2015
David Stockton
Who Am I?
• David Stockton
• VP of Technology, i3logix (Denver, CO)
• Developing PHP for ~17 years
• @dstockto
• http://davidstockton.com
• http://tddftw.com
• USB Drives contain an empty Apigility project
• Copy the apigility directory to your computer.
You need PHP 5.4.8 or greater on your computer
or a VM.
• Pass the drives on to the next person when
copying is done
• Please return them to me when everyone has a
copy
Other Software
• REST tester
• DHC in chrome
• POSTman
• Advanced Rest Client
• PAW
• Httpie
• Curl
Why build APIs?
Why not build APIs?
Content Negotiation
HTTP Method
Negotiation
Versioning
Validation
Authentication
Authorization
Documentation
Discovery
What can we do?
Apigility is opinionated
Content Negotiation
JSON / JSON+HAL
HTTP Method
Negotiation
GET, POST, PUT, PATCH,
DELETE, OPTIONS
Versioning
*supported*
Validation
*supported*
Authentication
*supported*
Authorization
*supported*
Documentation
*supported*
Discovery
HATEOAS via HAL
H - Hypermedia
A - As
T - The
E - Engine
O - Of
A - Application
S - State
HAL - Hypermedia
Application Language
{
"_links": {
"self": {
"href": “http://
phpcoder.ninja/api/user/dstockto"
}
}
"id": "dstockto",
"name": “David Stockton"
}
Let’s get started!
php -S 0.0.0.0:8181 -t
public/ public/index.php
Please rate this tutorial:
https://joind.in/14040

API All the Things!