SlideShare a Scribd company logo
1 of 26
Download to read offline
APIs (Application Programming
Interface)
are becoming commonplace
APIs are hard
• Content negotiation
• HTTP method negotiation
• Error reporting
• Versioning
API considerations
• Validation
• Authentication
• Authorization
• Documentation
Other considerations
Sounds difficult….
Here comes to rescue
Apigility - The world's easiest way to
create high-quality APIs.
What Is Apigility?
 Creating APIs for your applications shouldn't be hard.
 Apigility is an API Builder, designed to simplify
creating and maintaining useful, easy to consume, and
well structured APIs. Regardless of your experience in
API building, with Apigility you can build APIs that
enable mobile apps, developer communities, and any
other consumer controlled access to your applications.
Apigility and Zend Framework 2
 Apigility can be used to implement APIs in PHP. Apigility
is developed using Zend Framework 2, but this doesn't
mean you have to use this framework to develop your
API. You can use Apigility in any PHP application, using all
the libraries and frameworks that you want.
System Requirements
 To run Apigility you need PHP 5.3.23 or greater. But PHP
5.4.8+ for serving the admin user interface.
Installation
 From the terminal
The easiest way to install Apigility is from your terminal, executing
the following command:
curl -sS http://apigility.org/install | php
If you do not have curl installed you can use PHP itself:
php -r "readfile('http://apigility.org/install');" | php
Otherwise you can install Apigility using one of the alternative
following procedures.
 Via release tarball
Grab the latest release from the Apigility download page.
Untar it:
tar xzf zf-apigility-skeleton-1.0.0beta1.tgz
Installation
 Via Composer (create-project)
You can use the create-project command from Composer to create
the project in one go:
curl -s https://getcomposer.org/installer | php -- php
composer.phar create-project -sdev zfcampus/zf-apigility-skeleton
path/to/install
 Via Git (clone)
First, clone the repository:
git clone https://github.com/zfcampus/zf-apigility-skeleton.git #
optionally, specify the directory in which to clone cd
path/to/install
At this point, you need to use Composer to install dependencies.
Assuming you already have Composer:
composer.phar install
Basic Setup
 Once you have the basic installation, you need to put it in
development mode:
cd path/to/install php public/index.php development
Now, fire it up! Do one of the following:
 Create a vhost in your web server that points the DocumentRoot to
the public/ directory of the project
 Fire up the built-in web server in PHP (5.4.8+) (note: do not use this
for production!)
 In the latter case, do the following:
cd path/to/install php -S 0.0.0.0:8080 -t public public/index.php
You can then visit the site at http://localhost:8080/ - which will
bring up a welcome page and the ability to visit the dashboard in
order to create and inspect your APIs.
Content Negotiation
 content negotiation is the client telling the server what it is sending
and what it wants in return, and the server determining if it can do
what the client requests.
 To match the requested representation as specified by the client
via the Accept header with a representation the application can
deliver.
 To determine the Content-Type of incoming data and
deserialize it so the application can utilize it.
POST /foo HTTP/1.1
Accept: application/json
Content-Type: application/json
{ "foo": "bar" }
Error Reporting
API Problem - application/problem+json
{
"type": "/api/problems/forbidden",
"title": "Forbidden",
"detail": "Your API key is missing or invalid.",
"status": 403,
"authenticationUrl": "/api/oauth"
}
HTTP Method Negotiation
POST /albums HTTP/1.1
Content-Type: application/json
405 Method Not Allowed
Allow: GET
Versioning by default
Media type:
GET /albums HTTP/1.1
Accept: application/vnd.music.v1+json
URL-based:
/v1/albums
Validation
POST /albums/1 HTTP/1.1
Content-Type: application/json
{ "title": "" }
422 Unprocessable Entity
Content-Type: application/problem+json
{
"type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Unprocessable Entity",
"detail": "Failed validation",
"status": 422,
"validation_messages": {
"title": "Invalid title; must be a non-empty string"
}
}
Authentication
• HTTP Basic and Digest (for internal APIs)
• OAuth2 (for public APIs)
• Event-driven, to accommodate anything else
• Return a problem response early if invalid
credentials are provided
Authentication
GET /albums/1 HTTP/1.1
Authorisation: Basic foobar
Accept: application/json
401 Unauthorized
Content-Type: application/problem+json
{
"type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Unauthorized",
"detail": "Unauthorized",
"status": 401
}
Authorization
GET /albums/1 HTTP/1.1
Accept: application/json
403 Forbidden
Content-Type: application/problem+json
{
"type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Forbidden",
"detail": "Forbidden",
"status": 403
}
Documentation
• Written within admin while setting up API
• Automatically populated via validation admin
• User documentation:
• apigility/documentation/{API name}/V1
• JSON or HTMl based on accept header
• Swagger available too
References
• Apigility official website
http://apigility.org/
• Rob Allen
http://akrabat.com/
THANK YOU
That’s all for the
Introduction to Apigility

More Related Content

What's hot

Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Cogapp
 
Writing automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjectsWriting automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjectsLeticia Rss
 
Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptfunkatron
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Joe Ferguson
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in YiiIlPeach
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVMAlan Parkinson
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentationAndrei Burian
 
Django rest framework tips and tricks
Django rest framework   tips and tricksDjango rest framework   tips and tricks
Django rest framework tips and tricksxordoquy
 
All the support you need. Support libs in Android
All the support you need. Support libs in AndroidAll the support you need. Support libs in Android
All the support you need. Support libs in AndroidVitali Pekelis
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeceptionbuddhieash
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationRouven Weßling
 
PSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressivePSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressiveMilad Arabi
 
Testing PHP with Codeception
Testing PHP with CodeceptionTesting PHP with Codeception
Testing PHP with CodeceptionJohn Paul Ada
 
CodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHPCodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHPSteeven Salim
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in YiiIlPeach
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwalratneshsinghparihar
 

What's hot (20)

Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Writing automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjectsWriting automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjects
 
Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScript
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentation
 
Django rest framework tips and tricks
Django rest framework   tips and tricksDjango rest framework   tips and tricks
Django rest framework tips and tricks
 
All the support you need. Support libs in Android
All the support you need. Support libs in AndroidAll the support you need. Support libs in Android
All the support you need. Support libs in Android
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
Introduction to Zend Framework
Introduction to Zend FrameworkIntroduction to Zend Framework
Introduction to Zend Framework
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeception
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentation
 
PSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressivePSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend Expressive
 
Testing PHP with Codeception
Testing PHP with CodeceptionTesting PHP with Codeception
Testing PHP with Codeception
 
CodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHPCodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHP
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 

Viewers also liked

Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)James Titcumb
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with ExpressiveElton Minetto
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
 
Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterRalf Eggert
 
REST Level 5 - A Trek To The Summit
REST Level 5 - A Trek To The SummitREST Level 5 - A Trek To The Summit
REST Level 5 - A Trek To The SummitPat Cappelaere
 
Level 3 REST Makes Your API Browsable
Level 3 REST Makes Your API BrowsableLevel 3 REST Makes Your API Browsable
Level 3 REST Makes Your API BrowsableMatt Bishop
 

Viewers also liked (8)

Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with Expressive
 
Rest Beer v2
Rest Beer v2Rest Beer v2
Rest Beer v2
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiter
 
REST Level 5 - A Trek To The Summit
REST Level 5 - A Trek To The SummitREST Level 5 - A Trek To The Summit
REST Level 5 - A Trek To The Summit
 
Level 3 REST Makes Your API Browsable
Level 3 REST Makes Your API BrowsableLevel 3 REST Makes Your API Browsable
Level 3 REST Makes Your API Browsable
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 

Similar to Apigility – Lightning Fast API Development - OSSCamp 2014

The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API'sAchyuta Lakshmi
 
API Proxy Auto Discovery
API Proxy Auto DiscoveryAPI Proxy Auto Discovery
API Proxy Auto DiscoveryVince Soliza
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalHimanshu Mendiratta
 
Apache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentApache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentwebprogr.com
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platformNelson Kopliku
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM ichukShirley
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API DesignYos Riady
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
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
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and apiBhargav Ranjit
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario Romano
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public APIJeff Potts
 
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014Michelangelo van Dam
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with TitaniumKevin Whinnery
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 

Similar to Apigility – Lightning Fast API Development - OSSCamp 2014 (20)

Appium solution
Appium solutionAppium solution
Appium solution
 
The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API's
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
API Proxy Auto Discovery
API Proxy Auto DiscoveryAPI Proxy Auto Discovery
API Proxy Auto Discovery
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
Apache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentApache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app development
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platform
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
 
Webapi
WebapiWebapi
Webapi
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
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
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and api
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 

More from OSSCube

High Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationHigh Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationOSSCube
 
Accelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreAccelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreOSSCube
 
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesMigrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesOSSCube
 
Why Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersWhy Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersOSSCube
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutOSSCube
 
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...OSSCube
 
Cutting Through the Disruption
Cutting Through the DisruptionCutting Through the Disruption
Cutting Through the DisruptionOSSCube
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyOSSCube
 
Marketing and Sales together at last
Marketing and Sales together at lastMarketing and Sales together at last
Marketing and Sales together at lastOSSCube
 
Using pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionUsing pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionOSSCube
 
Talend for the Enterprise
Talend for the EnterpriseTalend for the Enterprise
Talend for the EnterpriseOSSCube
 
Ahead of the Curve
Ahead of the CurveAhead of the Curve
Ahead of the CurveOSSCube
 
Non functional requirements. do we really care…?
Non functional requirements. do we really care…?Non functional requirements. do we really care…?
Non functional requirements. do we really care…?OSSCube
 
Learning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMILearning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMIOSSCube
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using SeleniumOSSCube
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWSOSSCube
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityOSSCube
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014OSSCube
 
Performance Testing Session - OSSCamp 2014
Performance Testing Session -  OSSCamp 2014Performance Testing Session -  OSSCamp 2014
Performance Testing Session - OSSCamp 2014OSSCube
 
Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014OSSCube
 

More from OSSCube (20)

High Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationHigh Availability Using MySQL Group Replication
High Availability Using MySQL Group Replication
 
Accelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with PimcoreAccelerate Your Digital Transformation Journey with Pimcore
Accelerate Your Digital Transformation Journey with Pimcore
 
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and ChallengesMigrating Legacy Applications to AWS Cloud: Strategies and Challenges
Migrating Legacy Applications to AWS Cloud: Strategies and Challenges
 
Why Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your CustomersWhy Does Omnichannel Experience Matter to Your Customers
Why Does Omnichannel Experience Matter to Your Customers
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
 
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
Webinar: Five Ways a Technology Refresh Strategy Can Help Make Your Digital T...
 
Cutting Through the Disruption
Cutting Through the DisruptionCutting Through the Disruption
Cutting Through the Disruption
 
Legacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case studyLegacy to industry leader: a modernization case study
Legacy to industry leader: a modernization case study
 
Marketing and Sales together at last
Marketing and Sales together at lastMarketing and Sales together at last
Marketing and Sales together at last
 
Using pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfactionUsing pim to maximize revenue and improve customer satisfaction
Using pim to maximize revenue and improve customer satisfaction
 
Talend for the Enterprise
Talend for the EnterpriseTalend for the Enterprise
Talend for the Enterprise
 
Ahead of the Curve
Ahead of the CurveAhead of the Curve
Ahead of the Curve
 
Non functional requirements. do we really care…?
Non functional requirements. do we really care…?Non functional requirements. do we really care…?
Non functional requirements. do we really care…?
 
Learning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMILearning from experience: Collaborative Journey towards CMMI
Learning from experience: Collaborative Journey towards CMMI
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using Selenium
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014
 
Performance Testing Session - OSSCamp 2014
Performance Testing Session -  OSSCamp 2014Performance Testing Session -  OSSCamp 2014
Performance Testing Session - OSSCamp 2014
 
Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014Job Queue Presentation - OSSCamp 2014
Job Queue Presentation - OSSCamp 2014
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
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
 
"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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
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
 
"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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Apigility – Lightning Fast API Development - OSSCamp 2014

  • 1.
  • 4. • Content negotiation • HTTP method negotiation • Error reporting • Versioning API considerations
  • 5. • Validation • Authentication • Authorization • Documentation Other considerations
  • 7. Here comes to rescue
  • 8. Apigility - The world's easiest way to create high-quality APIs.
  • 9. What Is Apigility?  Creating APIs for your applications shouldn't be hard.  Apigility is an API Builder, designed to simplify creating and maintaining useful, easy to consume, and well structured APIs. Regardless of your experience in API building, with Apigility you can build APIs that enable mobile apps, developer communities, and any other consumer controlled access to your applications.
  • 10. Apigility and Zend Framework 2  Apigility can be used to implement APIs in PHP. Apigility is developed using Zend Framework 2, but this doesn't mean you have to use this framework to develop your API. You can use Apigility in any PHP application, using all the libraries and frameworks that you want.
  • 11. System Requirements  To run Apigility you need PHP 5.3.23 or greater. But PHP 5.4.8+ for serving the admin user interface.
  • 12. Installation  From the terminal The easiest way to install Apigility is from your terminal, executing the following command: curl -sS http://apigility.org/install | php If you do not have curl installed you can use PHP itself: php -r "readfile('http://apigility.org/install');" | php Otherwise you can install Apigility using one of the alternative following procedures.  Via release tarball Grab the latest release from the Apigility download page. Untar it: tar xzf zf-apigility-skeleton-1.0.0beta1.tgz
  • 13. Installation  Via Composer (create-project) You can use the create-project command from Composer to create the project in one go: curl -s https://getcomposer.org/installer | php -- php composer.phar create-project -sdev zfcampus/zf-apigility-skeleton path/to/install  Via Git (clone) First, clone the repository: git clone https://github.com/zfcampus/zf-apigility-skeleton.git # optionally, specify the directory in which to clone cd path/to/install At this point, you need to use Composer to install dependencies. Assuming you already have Composer: composer.phar install
  • 14. Basic Setup  Once you have the basic installation, you need to put it in development mode: cd path/to/install php public/index.php development Now, fire it up! Do one of the following:  Create a vhost in your web server that points the DocumentRoot to the public/ directory of the project  Fire up the built-in web server in PHP (5.4.8+) (note: do not use this for production!)  In the latter case, do the following: cd path/to/install php -S 0.0.0.0:8080 -t public public/index.php You can then visit the site at http://localhost:8080/ - which will bring up a welcome page and the ability to visit the dashboard in order to create and inspect your APIs.
  • 15.
  • 16. Content Negotiation  content negotiation is the client telling the server what it is sending and what it wants in return, and the server determining if it can do what the client requests.  To match the requested representation as specified by the client via the Accept header with a representation the application can deliver.  To determine the Content-Type of incoming data and deserialize it so the application can utilize it. POST /foo HTTP/1.1 Accept: application/json Content-Type: application/json { "foo": "bar" }
  • 17. Error Reporting API Problem - application/problem+json { "type": "/api/problems/forbidden", "title": "Forbidden", "detail": "Your API key is missing or invalid.", "status": 403, "authenticationUrl": "/api/oauth" }
  • 18. HTTP Method Negotiation POST /albums HTTP/1.1 Content-Type: application/json 405 Method Not Allowed Allow: GET
  • 19. Versioning by default Media type: GET /albums HTTP/1.1 Accept: application/vnd.music.v1+json URL-based: /v1/albums
  • 20. Validation POST /albums/1 HTTP/1.1 Content-Type: application/json { "title": "" } 422 Unprocessable Entity Content-Type: application/problem+json { "type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "detail": "Failed validation", "status": 422, "validation_messages": { "title": "Invalid title; must be a non-empty string" } }
  • 21. Authentication • HTTP Basic and Digest (for internal APIs) • OAuth2 (for public APIs) • Event-driven, to accommodate anything else • Return a problem response early if invalid credentials are provided
  • 22. Authentication GET /albums/1 HTTP/1.1 Authorisation: Basic foobar Accept: application/json 401 Unauthorized Content-Type: application/problem+json { "type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "detail": "Unauthorized", "status": 401 }
  • 23. Authorization GET /albums/1 HTTP/1.1 Accept: application/json 403 Forbidden Content-Type: application/problem+json { "type": "w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "detail": "Forbidden", "status": 403 }
  • 24. Documentation • Written within admin while setting up API • Automatically populated via validation admin • User documentation: • apigility/documentation/{API name}/V1 • JSON or HTMl based on accept header • Swagger available too
  • 25. References • Apigility official website http://apigility.org/ • Rob Allen http://akrabat.com/
  • 26. THANK YOU That’s all for the Introduction to Apigility