SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

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