SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Introduction to Apigility 
API Development made easy 
Thomas Dutrion / @tdutrion - September 2014
About me 
PHP Fan 
Founder and developer/architect at Engineor 
Working with Zend Framework since 2009 
@tdutrion / @engineor / thomas@engineor.com
API based architecture 
● Multiplication of the device types and size 
● Server side software independent from clients 
● Public access to data 
=> API-First development: api-first.com 
Introduction to Apigility
Implementation issues 
● How to standardise an API? 
● What are the best practices? 
● How to enable multiple clients with a single backend? 
=> Read blog.apigee.com 
Introduction to Apigility
API basics 
Introduction to Apigility
Architecture 
RPC: 
Remote Procedure Call is a 
distributed architecture where a 
client execute a procedure on a 
distant machine (server) 
REST: 
Representational State Transfer is an 
architecture where a client manage 
distant resources using HTTP verbs. 
Introduction to Apigility 
Example: 
GET http://your_api/get-current-time 
POST http://your_api/send-email 
Example: 
GET http://your_api/contact 
POST http://your_api/contact 
GET http://your_api/contact/id 
POST http://your_api/contact/id 
PUT http://your_api/contact/id 
PATCH http://your_api/contact/id 
DELETE http://your_api/contact/id
Output format standards 
JSON 
application/json 
{ 
“name”: “edPug”, 
“type”: “meetup” 
} 
JSON HAL 
application/hal+json 
{ 
“_links”: { 
“self”: { 
“href”: “http://localhost:8000/meetups/1” 
} 
} 
“name”: “edPug”, 
“type”: “meetup” 
} 
Introduction to Apigility 
Provide context to the entity / collection, self descriptive API
A tool to build your API 
● Generate your project structure 
● Leave all the configuration to the 
GUI 
● Focus on the business layer and only 
write the content of your methods 
Apigility has been created by Zend and the community to handle all the non-business code 
Introduction to Apigility 
and configurations
Content negotiation 
● Let the user (frontend developer) 
decide the output type he wants 
● Build-in JSON and HAL JSON types, 
you can add your own 
● Based on the accept header 
The documentation is a good example to test different output type on the same resource 
Introduction to Apigility
Documentation 
● Build-in documentation generator 
● Can be extended with Swagger for 
public documentation 
● Generated from the fields and 
constraints given within the GUI 
Documentation is always one of the most important and neglected points in API projects 
Self-descriptive API allow Apigility to build the documentation automatically 
Introduction to Apigility
application/problem+json 
{ 
“type”: 
“/api/problems/forbidden”, 
“title”: “Forbidden”, 
“detail”: “Your API key is 
missing or invalid.”, 
“status”: 403, 
“authenticationUrl”: 
“/api/oauth” 
} 
Error handling 
https://tools.ietf.org/html/draft-nottingham-http-problem-07 
Introduction to Apigility 
HTTP Problem RFC 
● Standard error message 
● Use http status code 
● Help your frontend developers to 
deal with errors
Authentication 
● HTTP Simple 
● HTTP Digest 
● OAuth2 
Multiple oauth scenarios, all 
described in the documentation 
Introduction to Apigility 
https://apigility.org/documentation/auth/authentication-about
Versioning 
● https://blog.apigee.com/detail/restful_api_design_how_many_versions 
● https://blog.apigee. 
com/detail/api_restful_design_question_verisioning_number_in_the_url 
Apigility provides a built in versioning 
You can specify the version through url or headers at your convenience 
Introduction to Apigility 
https://apigility.org/documentation/api-primer/versioning
Concrete introduction to Apigility 
History: 
● Announced during the ZendCon 
US in October 2013 
● First release 8th October 2013 
(version 0.6.0) 
● Currently version 1.0.4 
Introduction to Apigility 
Problems solved: 
● Standardising APIs 
● Rapid API centric application 
development 
● APIs for file upload as well 
● Give access to fast and clean API 
development for non developers 
(database connected API)
Installation 
● Using Composer 
● Using the auto installer 
● Using the archive download 
● Using the skeleton or as a dependance 
Watch the demo: https://www.youtube.com/watch?v=cE2rwGi437I 
Introduction to Apigility
Create a database connected API 
Watch the demo: https://www.youtube.com/watch?v=KYsOCCPrOwE 
Introduction to Apigility 
● Use HTTP verbs to query resources 
● Fetch automatically data from the table 
● The demo does not show a full CRUD, try it yourself, it’s easy!
Add an authentication 
● Add an HTTP Basic authentication 
● Not very dynamic (requires to change htpasswd for each new user) 
● Requires HTTPS 
=> good for internal projects or non critical project, prefer oauth in most cases 
Watch the demo: https://www.youtube.com/watch?v=0I_rTFRQid0 
Introduction to Apigility
Add a version 
● Generate new files in background 
● Use accept header to select a version 
● Use a route parameter to select a version 
Watch the demo: https://www.youtube.com/watch?v=Nt4BNn3QRoQ 
Introduction to Apigility
Live demonstration 
Introduction to Apigility
Questions? 
Feel free to comment the presentation: http://www.slideshare.net/engineor/introduction-to-apigility 
Thanks to: 
● Enrico Zimuel / @ezimuel - https://speakerdeck.com/ezimuel/apigility-the-api-builder-for-php 
● Enrico Zimuel / @ezimuel - http://goo.gl/io7nqO 
● Rob Allen / @akrabat - http://akrabat.com/wp-content/uploads/20140318-phpne-apigility-intro.pdf 
Introduction to Apigility

Contenu connexe

Tendances

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
 
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
 
From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.David Aguilera
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Joe Ferguson
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentationAndrei Burian
 
Turbocharge your API strategy with SDK
Turbocharge your API strategy with SDKTurbocharge your API strategy with SDK
Turbocharge your API strategy with SDKRamesh Elaiyavalli
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React NativeFITC
 
API Design first with Swagger
API Design first with SwaggerAPI Design first with Swagger
API Design first with SwaggerTony Tam
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
Evolving an Application Architecture
Evolving an Application ArchitectureEvolving an Application Architecture
Evolving an Application ArchitectureGarret Fick
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPIScott Triglia
 
Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Devin Abbott
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsPatrick Viafore
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativePolidea
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorTony Tam
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaArun Gupta
 
AngularJS: Service, factory & provider
AngularJS: Service, factory & providerAngularJS: Service, factory & provider
AngularJS: Service, factory & providerCorley S.r.l.
 
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
 

Tendances (20)

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
 
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)
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.From Good to Great: Functional and Acceptance Testing in WordPress.
From Good to Great: Functional and Acceptance Testing in WordPress.
 
C# 6
C# 6C# 6
C# 6
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentation
 
Turbocharge your API strategy with SDK
Turbocharge your API strategy with SDKTurbocharge your API strategy with SDK
Turbocharge your API strategy with SDK
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
 
API Design first with Swagger
API Design first with SwaggerAPI Design first with Swagger
API Design first with Swagger
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Evolving an Application Architecture
Evolving an Application ArchitectureEvolving an Application Architecture
Evolving an Application Architecture
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
 
Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger Inflector
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
 
AngularJS: Service, factory & provider
AngularJS: Service, factory & providerAngularJS: Service, factory & provider
AngularJS: Service, factory & provider
 
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
 

Similaire à Introduction to Apigility

APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...Restlet
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
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
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in ChoreoWSO2
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsApigee | Google Cloud
 
Build Android App using GCE & GAE
Build Android App using GCE & GAEBuild Android App using GCE & GAE
Build Android App using GCE & GAELove Sharma
 
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxGoogleDeveloperStude22
 
Introduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentIntroduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentColin Su
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonSmartBear
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015Tom Johnson
 
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
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open StandardsAPIsecure_ Official
 
API designing with WSO2 API Manager
API designing with WSO2 API ManagerAPI designing with WSO2 API Manager
API designing with WSO2 API ManagerWSO2
 
Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIGOG.com dev team
 

Similaire à Introduction to Apigility (20)

APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
API Conference 2021
API Conference 2021API Conference 2021
API Conference 2021
 
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
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 
Build Android App using GCE & GAE
Build Android App using GCE & GAEBuild Android App using GCE & GAE
Build Android App using GCE & GAE
 
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptx
 
Introduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentIntroduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API Development
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015
 
Node.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniquesNode.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniques
 
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
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards
 
API designing with WSO2 API Manager
API designing with WSO2 API ManagerAPI designing with WSO2 API Manager
API designing with WSO2 API Manager
 
InChI Resolver
InChI ResolverInChI Resolver
InChI Resolver
 
Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPI
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 

Dernier

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Introduction to Apigility

  • 1. Introduction to Apigility API Development made easy Thomas Dutrion / @tdutrion - September 2014
  • 2. About me PHP Fan Founder and developer/architect at Engineor Working with Zend Framework since 2009 @tdutrion / @engineor / thomas@engineor.com
  • 3. API based architecture ● Multiplication of the device types and size ● Server side software independent from clients ● Public access to data => API-First development: api-first.com Introduction to Apigility
  • 4. Implementation issues ● How to standardise an API? ● What are the best practices? ● How to enable multiple clients with a single backend? => Read blog.apigee.com Introduction to Apigility
  • 5. API basics Introduction to Apigility
  • 6. Architecture RPC: Remote Procedure Call is a distributed architecture where a client execute a procedure on a distant machine (server) REST: Representational State Transfer is an architecture where a client manage distant resources using HTTP verbs. Introduction to Apigility Example: GET http://your_api/get-current-time POST http://your_api/send-email Example: GET http://your_api/contact POST http://your_api/contact GET http://your_api/contact/id POST http://your_api/contact/id PUT http://your_api/contact/id PATCH http://your_api/contact/id DELETE http://your_api/contact/id
  • 7. Output format standards JSON application/json { “name”: “edPug”, “type”: “meetup” } JSON HAL application/hal+json { “_links”: { “self”: { “href”: “http://localhost:8000/meetups/1” } } “name”: “edPug”, “type”: “meetup” } Introduction to Apigility Provide context to the entity / collection, self descriptive API
  • 8. A tool to build your API ● Generate your project structure ● Leave all the configuration to the GUI ● Focus on the business layer and only write the content of your methods Apigility has been created by Zend and the community to handle all the non-business code Introduction to Apigility and configurations
  • 9. Content negotiation ● Let the user (frontend developer) decide the output type he wants ● Build-in JSON and HAL JSON types, you can add your own ● Based on the accept header The documentation is a good example to test different output type on the same resource Introduction to Apigility
  • 10. Documentation ● Build-in documentation generator ● Can be extended with Swagger for public documentation ● Generated from the fields and constraints given within the GUI Documentation is always one of the most important and neglected points in API projects Self-descriptive API allow Apigility to build the documentation automatically Introduction to Apigility
  • 11. application/problem+json { “type”: “/api/problems/forbidden”, “title”: “Forbidden”, “detail”: “Your API key is missing or invalid.”, “status”: 403, “authenticationUrl”: “/api/oauth” } Error handling https://tools.ietf.org/html/draft-nottingham-http-problem-07 Introduction to Apigility HTTP Problem RFC ● Standard error message ● Use http status code ● Help your frontend developers to deal with errors
  • 12. Authentication ● HTTP Simple ● HTTP Digest ● OAuth2 Multiple oauth scenarios, all described in the documentation Introduction to Apigility https://apigility.org/documentation/auth/authentication-about
  • 13. Versioning ● https://blog.apigee.com/detail/restful_api_design_how_many_versions ● https://blog.apigee. com/detail/api_restful_design_question_verisioning_number_in_the_url Apigility provides a built in versioning You can specify the version through url or headers at your convenience Introduction to Apigility https://apigility.org/documentation/api-primer/versioning
  • 14. Concrete introduction to Apigility History: ● Announced during the ZendCon US in October 2013 ● First release 8th October 2013 (version 0.6.0) ● Currently version 1.0.4 Introduction to Apigility Problems solved: ● Standardising APIs ● Rapid API centric application development ● APIs for file upload as well ● Give access to fast and clean API development for non developers (database connected API)
  • 15. Installation ● Using Composer ● Using the auto installer ● Using the archive download ● Using the skeleton or as a dependance Watch the demo: https://www.youtube.com/watch?v=cE2rwGi437I Introduction to Apigility
  • 16. Create a database connected API Watch the demo: https://www.youtube.com/watch?v=KYsOCCPrOwE Introduction to Apigility ● Use HTTP verbs to query resources ● Fetch automatically data from the table ● The demo does not show a full CRUD, try it yourself, it’s easy!
  • 17. Add an authentication ● Add an HTTP Basic authentication ● Not very dynamic (requires to change htpasswd for each new user) ● Requires HTTPS => good for internal projects or non critical project, prefer oauth in most cases Watch the demo: https://www.youtube.com/watch?v=0I_rTFRQid0 Introduction to Apigility
  • 18. Add a version ● Generate new files in background ● Use accept header to select a version ● Use a route parameter to select a version Watch the demo: https://www.youtube.com/watch?v=Nt4BNn3QRoQ Introduction to Apigility
  • 20. Questions? Feel free to comment the presentation: http://www.slideshare.net/engineor/introduction-to-apigility Thanks to: ● Enrico Zimuel / @ezimuel - https://speakerdeck.com/ezimuel/apigility-the-api-builder-for-php ● Enrico Zimuel / @ezimuel - http://goo.gl/io7nqO ● Rob Allen / @akrabat - http://akrabat.com/wp-content/uploads/20140318-phpne-apigility-intro.pdf Introduction to Apigility