SlideShare a Scribd company logo
1 of 26
Download to read offline
BUILDING AN
AEM API CLIENTS ECOSYSTEM
Cliffano Subagio - Michael Diender - Stephen Shim
Shine Solutions
Agenda
• A little bit of history
• API clients ecosystem
• Demo applications
• To do list
AEM 5.6.1
Q: How do you deploy a package?
A: Use this curl command.
Q: Really?
Q: How do you …?
A: Use that curl command.
Problems
• curl —fail is not fail-safe
• Can’t rely on exit code
• Can’t rely on HTTP status code
• Need to parse response body
• Unexpected AEM state
API client
• A helper library
• Authentication
• HTTP request/response
• Debugging
Why API client?
• First class for your tech stack
• Better error handling
• Simpler response body parsing
• Easier integration with 3rd party tools
Moarrr clients
• In 2014: wrote an AEM Python client
• In 2015: wrote an AEM Ruby client
• Other clients written by others
There’s got to be

a better way
Swagger
• An API framework
• Open API specification
• Swagger Codegen
API client ecosystem
• More than a single client
• Centred on Open API specification
• Generate all API clients
API
SPECIFICATION
GENERATED
RUBY CLIENT
GENERATED
PYTHON CLIENT
GENERATED
JAVASCRIPT
CLIENT
GENERATED
JAVA CLIENT
RUBY_AEM
PYTHONAEM?
NODE-AEM?
AEMAPI4J?
Swagger AEM
API specification
paths:
/libs/granite/security/post/authorizables:
post:
operationId: postAuthorizables
produces:
- text/html
parameters:
- name: authorizableId
in: query
required: true
type: string
…
responses:
default:
schema:
type: string
require 'swagger_aem'

SwaggerAemClient.configure { |conf| [
conf.host = 'http://localhost:4502',
conf.username = 'admin',
conf.password = 'admin',
conf.params_encoding = :multi
]}

api = SwaggerAemClient::SlingApi.new



data, status_code, headers = api.post_authorizables_with_http_info(
authorizable_id = 'someuser',
intermediate_path = '/home/users/s',
{
:create_user => '',
:reppassword => 'somepassword'
}
)
Ruby client
import swaggeraem
import swaggeraem.configuration
swaggeraem.configuration.username = 'admin'
swaggeraem.configuration.password = 'admin'
client = swaggeraem.ApiClient(‘http://localhost:4502/')
api = swaggeraem.apis.SlingApi(client)
opts= {
'create_user': '',
'reppassword': 'somepassword'
}
response = api.post_authorizables_with_http_info(

user_name, '/home/users/s', **opts)
Python client
RUBY CLIENT DEMO
AEM Integration with Slack
PYTHON CLIENT
DEMO
AEM Integration with AWS Lambda
SWAGGER AEM
RUBY CLIENT
PYTHON CLIENT
JAVASCRIPT
CLIENT
JAVA CLIENT
JAVA
FRAMEWORKS
An ecosystem
ANSIBLE
PUPPET
AWS LAMBDA
CHEF
SLACK
GULP
GRUNT
GOOGLE HOME
AMAZON ECHO
APPLE WATCH
TODO
• Python, JavaScript, and Java clients

(in progress)
• More languages support?
TODO
• AEM 6.1 Assets API
• 100% generated clients
Join the effort, contributions are welcome!
https://github.com/shinesolutions/swagger-aem
CREDITS
Background images are from Google search with reuse rights:
• Europasaurus holgeri - https://en.wikipedia.org/wiki/Mesozoic#/
media/File:Europasaurus_holgeri_Scene_2.jpg
• Yes really - http://www.quickmeme.com/meme/36i4mo
• Head of the Charles Regatta - http://hocr.tumblr.com/post/
34706902195

More Related Content

Viewers also liked

When dispatcher caching is not enough...
When dispatcher caching is not enough...When dispatcher caching is not enough...
When dispatcher caching is not enough...
Jakub Wadolowski
 
Vimeo Integration with aem
Vimeo Integration with aemVimeo Integration with aem
Vimeo Integration with aem
Manisha Bano
 

Viewers also liked (20)

When dispatcher caching is not enough...
When dispatcher caching is not enough...When dispatcher caching is not enough...
When dispatcher caching is not enough...
 
AEM 6.0 Touch-optimized UI
AEM 6.0 Touch-optimized UIAEM 6.0 Touch-optimized UI
AEM 6.0 Touch-optimized UI
 
Cqcon
CqconCqcon
Cqcon
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
 
Introducing Apache Jackrabbit OAK
Introducing Apache Jackrabbit OAKIntroducing Apache Jackrabbit OAK
Introducing Apache Jackrabbit OAK
 
AEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & FeaturesAEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & Features
 
ShepHertz - A Complete Cloud Ecosystem for your Apps
ShepHertz - A Complete Cloud Ecosystem for your AppsShepHertz - A Complete Cloud Ecosystem for your Apps
ShepHertz - A Complete Cloud Ecosystem for your Apps
 
Integration Testing in AEM
Integration Testing in AEMIntegration Testing in AEM
Integration Testing in AEM
 
AEM integration with Apache Mahout
AEM integration with Apache MahoutAEM integration with Apache Mahout
AEM integration with Apache Mahout
 
Mail chimp Integration with AEM
Mail chimp Integration with AEMMail chimp Integration with AEM
Mail chimp Integration with AEM
 
Vimeo Integration with aem
Vimeo Integration with aemVimeo Integration with aem
Vimeo Integration with aem
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface Customization
 
AEM - Client Libraries
AEM - Client LibrariesAEM - Client Libraries
AEM - Client Libraries
 
REST in AEM
REST in AEMREST in AEM
REST in AEM
 
CIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsCIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM Apps
 
Cloud Channel Ecosystem
Cloud Channel EcosystemCloud Channel Ecosystem
Cloud Channel Ecosystem
 
User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
 
Adobe AEM Commerce with hybris
Adobe AEM Commerce with hybrisAdobe AEM Commerce with hybris
Adobe AEM Commerce with hybris
 
Adobe Summit 2016 Bombardier’s AEM Implementation for Multi-sites Management
Adobe Summit 2016 Bombardier’s AEM Implementation for Multi-sites ManagementAdobe Summit 2016 Bombardier’s AEM Implementation for Multi-sites Management
Adobe Summit 2016 Bombardier’s AEM Implementation for Multi-sites Management
 
AEM (CQ) eCommerce Framework
AEM (CQ) eCommerce FrameworkAEM (CQ) eCommerce Framework
AEM (CQ) eCommerce Framework
 

More from Cliffano Subagio

Cross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWSCross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWS
Cliffano Subagio
 

More from Cliffano Subagio (20)

Cross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWSCross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWS
 
AEM OpenCloud Delivery Practices
AEM OpenCloud Delivery PracticesAEM OpenCloud Delivery Practices
AEM OpenCloud Delivery Practices
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live ParisOpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live AustraliaOpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
 
A Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpecA Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpec
 
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise EnvironmentsHow to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
 
Swagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEMSwagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEM
 
Introducing AEM OpenCloud
Introducing AEM OpenCloudIntroducing AEM OpenCloud
Introducing AEM OpenCloud
 
A Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOpsA Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOps
 
Conversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctionsConversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctions
 
Let's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For KidsLet's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For Kids
 
Having A Talk With Jenkins
Having A Talk With JenkinsHaving A Talk With Jenkins
Having A Talk With Jenkins
 
AEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two YearsAEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two Years
 
AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0
 
Beyond AEM Curl Commands
Beyond AEM Curl CommandsBeyond AEM Curl Commands
Beyond AEM Curl Commands
 
AEM OpenCloud
AEM OpenCloudAEM OpenCloud
AEM OpenCloud
 
Open Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short IntroOpen Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short Intro
 
How To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum CleanerHow To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum Cleaner
 
Bringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The MassesBringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The Masses
 
Application Deployment Using Ansible
Application Deployment Using AnsibleApplication Deployment Using Ansible
Application Deployment Using Ansible
 

Recently uploaded

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
vu2urc
 
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
Earley Information Science
 

Recently uploaded (20)

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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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?
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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...
 
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...
 

Building An AEM API Clients Ecosystem