© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Developing and Managing API with Adobe ColdFusion and API
Manager
Kevin, Mayur, Pavan
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Agenda
 Use Case
 Designing your API
 API Manager Actors
 Onboarding of the API
 Building Blocks
 Security
 SLA
 Analytics
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API
API Manager
M
E
R
C
H
A
N
T
STORE ADMINISTRATOR
C
U
S
T
O
M
E
R
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
E-commerce Store APIs
1. Product
2. Merchants
3. Order
4. Promotion
5. Payment Gateway
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Product API
Endpoints:
Add a product
(POST /products/v1 )
Get all products
(GET /products/v1 )
Add/Update Brand
(PUT /products/v1 )
Search product
(GET /products/v1/search?searchid=123)
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Merchant API
Endpoints:
Add a product
(POST /merchant/v1/products/<merchant_id>)
Update Product Price
(PUT merchant/v1/products/<merchant_id>?product_id=101965 )
Update Product quantity
(PUT merchant/v1/products/<merchant_id>?product_id=101965 )
Delete a product under merchant store
(DELETE /merchant/v1/products/<merchant_id>? product_id=101965)
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Order API
Endpoints:
Place a new Order
( POST /order/v1)
Retrieve List of All Orders
(GET /orders/v1/<customerId>)
Update an Order
(PUT /orders/v1/<orderid>)
Delete a Single Order
(DELETE /orders/v1/ /<customerId>/<orderid>)
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Promotion API
Endpoints:
Create a promotion type
(POST /promotion/v1)
Create a discount code
(POST /promotion/discount)
Invalidate a discount code
(PUT /promotion/discount/invalidate/<discount_code>)
Retrieve List of promotions
(GET /promotion/v1)
8
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Payment Gateways
Endpoints:
Get all registered gateways
(GET /gateway/v1)
Disable a Gateway
(PUT /gateway/v1/<gateway_id>)
Enable a Gateway
(PUT /promotion/v1/<gateway_id>)
9
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Building API’s in ColdFusion
 You can create REST services by defining certain attributes in the tags cfcomponent, cffunction, and cfargument and publish
as REST resources. Script can also be used.
• Follows HTTP request-response model: Beyond having HTTP as a medium, the service lets you follow all HTTP norms. The
components published as REST services can be consumed over HTTP/HTTPS request. The REST services are identified with
URI (Uniform Resource Identifier) and can be accessed from a web page as well as by specifying the URI in the browser's
address bar.
• Supports all HTTP methods : The REST enabled CFCs support the following HTTP methods: GET, POST, PUT, DELETE, HEAD,
and OPTIONS.
• Implicit handling of serialization/deserialization: ColdFusion natively supports JSON and XML serialization/deserialization. So
client applications can consume REST services by issuing HTTP/HTTPS request. The response can either be serialized to
XML or JSON format.
• Publish web service as both REST service and WSDL service: You can create and publish the same ColdFusion component as
a REST service and WSDL service.
10
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
<cfcomponent>
 Two arguments for the <cfcomponent> tag:
 rest (true/false) – if true, the cfc is REST enabled.
 restPath – path used to access the REST service.
 Example:
 <cfcomponent rest="true" restpath="/person">
11
Sample URI:
http://localhost:8500/rest/restTest/restService
URL Component Description
http://localhost:8500 Base URL which includes the IP address and port of the ColdFusion server.If
you deploy ColdFusion as a JEE application, the URL will contain a context
root, for example,
http://localhost:8500*/cfusion*
rest Implies that the request sent is a REST request.This default value can be
renamed by revising the context path in web.xml available at
cfusion/wwroot/WEB-INF and update the same mapping in
uriworkermap.properties file found at configwsconfig1.
restTest Application name or service mapping that you have used while registering
the service in ColdFusion Administrator. If you do not specify a service
mapping in the ColdFusion Administrator, then the application name is
taken from Application.cfc.
restService Rest path you defined in the service. That is, the value of the attribute
restPath in the tag cfcomponent.
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
<cffunction>
 <cffunction>
 restPath – specify to use a sub-resource path for the CFC.
 httpMethod – the HTTP method to use
 GET, POST, PUT, DELETE, HEAD, OPTIONS
 Example:
 <cffunction name="getPerson” returntype="string” access="remote” httpmethod="GET”
restPath=“/person/{personID}” produces="application/json”>
12
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
<cfargument>
 <cfargument>
 restArgSource – Where to find the value of the argument
 path,query,form,cookie,header,matrix
 restArgName – The name that can be mapped to the argument name.
 Example:
 <cfargument name=”personID" required="true" type="numeric" restargsource="path" />
13
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Registering an application with the REST service
 After you create the CFC you want to REST-enable, specify the folder for registering as web
service either using the autoRegister Application setting, the function restInitAplication() or in
the ColdFusion Administrator or using the ColdFusion Admin API.
 If you are in a shared environment:
 <cfset this.restsettings.autoregister = true />
 restInitApplication(rootPath[,serviceMapping[,options]])
 These options not require administrator privileges.
14
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
REST Responses
15
Default Response Description
200 OK Sent if the response has a body.
204 No Content Sent if the response doesn’t have a body.
Default Response Description
404 Not Found Request URL is not valid
406 Not Acceptable No function in the REST service can produce the MIME type
requested by the client
415 Unsupported Media Type A resource is unable to consume the MIME type of the client
request
405 Method not allowed If the client invokes an HTTP method on a valid URI to which
the request HTTP method is not bound.
Custom responses can be created using the restSetResponse method for
success or <cfthrow type=“RestError”> for errors.
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Areas I look into:
Web Services (SOAP, REST) , PDF, Spreadsheet
API Manager
Hobbies:
Working on DIY projects
Of course watching TV Series (GOT !!! )
Adobe ColdFusion TeamI AM AN ENGINEER
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API
API Manager
M
E
R
C
H
A
N
T
STORE ADMINISTRATOR
C
U
S
T
O
M
E
R
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
E-commerce Store APIs
1. Product
2. Merchants
3. Order
4. Promotion
5. Payment Gateway
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Manager Actors
19
ADMINISTRATOR PUBLISHER
API Developer
SUBSCRIBER
APP Creator
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Onboarding the API
 Manual API Creation
 CF Discovery
 Swagger Import
 Soap to Rest
 Soap Pass Through
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Manager Building Blocks
 API Visibility
 API Versioning
 API Life cycle
 Security
 SLA
 Caching
 Analytics
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Visibility
 Public
 Partner
 Intranet
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Versioning
Upgrade APIs without worrying about
backward compatibility by managing
multiple versions using a single platform.
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Life cycle
 Draft
 Published
 Deprecate
 Retire
25
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Caching
26
During experiments, Many bird
species store peanuts in a cache
for later retrieval. In the wild,
these birds store acorns and
insects.
Wikipedia
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
About me
Developer & Security Evangelist at Adobe
Previously Security Consultant at RSA Security
Movie Buff
Email: sanniset@adobe.com
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API Security
28
Identity Authentication Authorization
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
User Store and API Security
 API Security
 API Key
 Basic
 OAuth2 and OAuth2 with SAML
 User Store
 LDAP
 Data Base
 SAML
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
API/APP Key Authentication
 Suitable for Business to Business Sharing
 Application Identification
30
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Authentication (Who say you are)
31
 How to Bring in the Users ? (User Stores)
 LDAP
 DATABASE
 SAML
 Administrator can configure user stores.
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sample User Store: Database
32
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
BASIC Authentication
 Simplest & Standard form of authenticating
 Auth happens via username & password.
 Pass Username & password in each request
 Requires HTTPS
 Application Should securely store the password
33
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
When it is not Enough!!!!
 Password Anti Pattern
 Trust Issues – Third Party Apps
 Can’t Revoke Application
 No Selective Data Sharing
34
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
An open protocol to allow secureauthorization
in a simple and standard method from web,
mobile and desktop applications.
Introducing
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resource Owner: the person or theapplication
that holds the data to be shared.
Resource Server: the application that holdsthe
protected resources.
Authorization Server: the application that
verifies the identity of the users.
Client: the application that makes requests to
RS on behalf of RO.
OAuth 2.0: Actors
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resource Owner: the person or the application
that holds the data to be shared.
Resource Server: the application that holdsthe
protected resources.
Authorization Server: the application that
verifies the identity of the users.
Client: the application that makes requests to
RS on behalf of RO.
OAuth 2.0: Actors
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resource Owner: the person or the application
that holds the data to be shared.
Resource Server: the application that holds the
protected resources.
Authorization Server: the application that
verifies the identity of the users.
Client: the application that makes requests to
RS on behalf of RO.
OAuth 2.0: Actors
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resource Owner: the person or the application
that holds the data to be shared.
Resource Server: the application that holds the
protected resources.
Authorization Server: the application that
verifies the identity of the users.
Client: the application that makes requests to
RS on behalf of RO.
OAuth 2.0: Actors
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
I want to see a list of games
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Hey, API Manager, could you please
give me a list of games?
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
Sorry Pal, This is a secured API. Provide me an
Access Token.
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
@alvaro_sanchez
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
@alvaro_sanchez
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
Hi, Could you provide me your
username & password ?
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Here you go. My username is
sanniset@adobe.com and password is top-
secret
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
@alvaro_sanchez
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Hi API Manager, here is my token:
7ee85874dde4c7235b6c3afc82e3fb
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
Hi, I have been given the token
7ee85874dde4c7235b6c3afc82e3fb. Is it
Legitimate ?
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Protocol Flow
Of Course. The Token is valid & it
belongs to sanniset@adobe.com
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
All Well!!. Here is the list of games
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Here you are the list of games. Have a
goodday!
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
OAuth 2.0 isa delegation protocol, as this
guy has no idea about the credentials of
this guy
Protocol Flow
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SLA
 SLA Plans
 Rate Limiting
 Throttling
 HARD and SOFT Limit
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 55
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Analytics
 Administrator Analytics
 Publisher Analytics
 Subscriber Analytics
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Recap - APIs – From concept to Go-To-Market
Step 1
Define your business
objectives
58
Step 2
Design your API
Step 3
On-board your API
Step 4
Manage your API
Step 5
Secure your API
Step 6
Engage Customers
Step 7
Measure impact
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 59
Api manager preconference

More Related Content

PDF
Where is cold fusion headed
PDF
Developer Insights for Application Upgrade to ColdFusion 2016
PDF
Securing applications
PPT
Restful services with ColdFusion
PDF
Build your own secure and real-time dashboard for mobile and web
PPTX
Load Balancing, Failover and Scalability with ColdFusion
PPTX
Workflows and Digital Signatures
PDF
Migration to ColdFusion 11 – making it seamless and easy anit
Where is cold fusion headed
Developer Insights for Application Upgrade to ColdFusion 2016
Securing applications
Restful services with ColdFusion
Build your own secure and real-time dashboard for mobile and web
Load Balancing, Failover and Scalability with ColdFusion
Workflows and Digital Signatures
Migration to ColdFusion 11 – making it seamless and easy anit

What's hot (20)

PPT
Restful API's with ColdFusion
PDF
ColdFusion Keynote: Building the Agile Web Since 1995
PPTX
Building ColdFusion And AngularJS Applications
PDF
Hidden Gems in ColdFusion 2016
PDF
Bring api manager into your stack
PPTX
Single page apps_with_cf_and_angular[1]
PPTX
10 Reasons ColdFusion PDFs should rule the world
PDF
Super Fast Application development with Mura CMS
PDF
Developing html5 mobile applications using cold fusion 11
PDF
Cfml features modern_coding
PPTX
Intro to Coldfusion
PDF
A Bit of REST
PDF
Developing High Performance and Scalable ColdFusion Application Using Terraco...
PDF
ITB2016 - Building ColdFusion RESTFul Services
PDF
AEM GEMS Session SAML authentication in AEM
PPTX
Mule Hyderabad Meetup (Mule 4)
PDF
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
PPTX
Building Content-Rich Java Apps in the Cloud with the Alfresco API
PPTX
Intro to Alfresco for Developers
PPTX
Mobile Applications Made Easy with ColdFusion 11
Restful API's with ColdFusion
ColdFusion Keynote: Building the Agile Web Since 1995
Building ColdFusion And AngularJS Applications
Hidden Gems in ColdFusion 2016
Bring api manager into your stack
Single page apps_with_cf_and_angular[1]
10 Reasons ColdFusion PDFs should rule the world
Super Fast Application development with Mura CMS
Developing html5 mobile applications using cold fusion 11
Cfml features modern_coding
Intro to Coldfusion
A Bit of REST
Developing High Performance and Scalable ColdFusion Application Using Terraco...
ITB2016 - Building ColdFusion RESTFul Services
AEM GEMS Session SAML authentication in AEM
Mule Hyderabad Meetup (Mule 4)
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Intro to Alfresco for Developers
Mobile Applications Made Easy with ColdFusion 11
Ad

Viewers also liked (18)

PDF
API Economy, Realizing the Business Value of APIs
PDF
Building better SQL Server Databases
PDF
PDF
Don't just pdf, Smart PDF
PDF
Crafting ColdFusion Applications like an Architect
PDF
Monetizing Business Models: ColdFusion and APIS
PDF
Security And Access Control For APIS using CF API Manager
PDF
ColdFusion in Transit action
PDF
Become a Security Rockstar with ColdFusion 2016
PDF
Why Everyone else writes bad code
PDF
Testing automaton
PDF
Instant ColdFusion with Vagrant
PPTX
WordPress Security - The "No-BS" Version
PPTX
Platform for Secure Digital Business
PDF
Cold fusion Security-How to Secure Coldfusion Server
PDF
ColdFusion Features for More Modern Coding
PPTX
Improve ColdFusion Performance by tuning the Connector and using ColdFusion-T...
KEY
Using NoSQL MongoDB with ColdFusion
API Economy, Realizing the Business Value of APIs
Building better SQL Server Databases
Don't just pdf, Smart PDF
Crafting ColdFusion Applications like an Architect
Monetizing Business Models: ColdFusion and APIS
Security And Access Control For APIS using CF API Manager
ColdFusion in Transit action
Become a Security Rockstar with ColdFusion 2016
Why Everyone else writes bad code
Testing automaton
Instant ColdFusion with Vagrant
WordPress Security - The "No-BS" Version
Platform for Secure Digital Business
Cold fusion Security-How to Secure Coldfusion Server
ColdFusion Features for More Modern Coding
Improve ColdFusion Performance by tuning the Connector and using ColdFusion-T...
Using NoSQL MongoDB with ColdFusion
Ad

Similar to Api manager preconference (20)

PPTX
REST Development made Easy with ColdFusion Aether
PPTX
ColdFusion Internals
PDF
ColdFusion 10
PDF
REST full API Design
PDF
Don't screw it up! How to build durable API
PPT
Restful_api
PDF
API management with Taffy and API Blueprint
PDF
Architecting &Building Scalable Secure Web API
PDF
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
PDF
REST Api with Asp Core
PPTX
Keeping Current with ColdFusion - Adobe Max 2011
PDF
Designing Usable APIs featuring Forrester Research, Inc.
PPTX
Building Software Backend (Web API)
PPTX
Cloud Computing Simple REST API in PHP: Read
PDF
Modern REST API design principles and rules.pdf
PDF
Get cfml Into the Box 2018
PDF
Modern REST API design principles and rules.pdf
PDF
Rest Introduction (Chris Jimenez)
PDF
Restful web-services
PDF
Agile RESTful Web Development
REST Development made Easy with ColdFusion Aether
ColdFusion Internals
ColdFusion 10
REST full API Design
Don't screw it up! How to build durable API
Restful_api
API management with Taffy and API Blueprint
Architecting &Building Scalable Secure Web API
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
REST Api with Asp Core
Keeping Current with ColdFusion - Adobe Max 2011
Designing Usable APIs featuring Forrester Research, Inc.
Building Software Backend (Web API)
Cloud Computing Simple REST API in PHP: Read
Modern REST API design principles and rules.pdf
Get cfml Into the Box 2018
Modern REST API design principles and rules.pdf
Rest Introduction (Chris Jimenez)
Restful web-services
Agile RESTful Web Development

More from ColdFusionConference (10)

PDF
Rest ful tools for lazy experts
PDF
Herding cats managing ColdFusion servers with commandbox
PDF
Realtime with websockets
PDF
Instant ColdFusion with Vagrant
PDF
Hidden gems in cf2016
PDF
Everyones invited! Meet accesibility requirements with ColdFusion
PDF
Getting started with mobile application development
PDF
Keep Applications Online
PDF
Dependency Injection
PDF
ColdFusion Craftsmanship
Rest ful tools for lazy experts
Herding cats managing ColdFusion servers with commandbox
Realtime with websockets
Instant ColdFusion with Vagrant
Hidden gems in cf2016
Everyones invited! Meet accesibility requirements with ColdFusion
Getting started with mobile application development
Keep Applications Online
Dependency Injection
ColdFusion Craftsmanship

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Five Habits of High-Impact Board Members
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Modernising the Digital Integration Hub
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
The various Industrial Revolutions .pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Tartificialntelligence_presentation.pptx
Enhancing emotion recognition model for a student engagement use case through...
CloudStack 4.21: First Look Webinar slides
Benefits of Physical activity for teenagers.pptx
Web Crawler for Trend Tracking Gen Z Insights.pptx
A novel scalable deep ensemble learning framework for big data classification...
Developing a website for English-speaking practice to English as a foreign la...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Five Habits of High-Impact Board Members
Chapter 5: Probability Theory and Statistics
Modernising the Digital Integration Hub
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
The various Industrial Revolutions .pptx
STKI Israel Market Study 2025 version august
Hindi spoken digit analysis for native and non-native speakers
NewMind AI Weekly Chronicles – August ’25 Week III
observCloud-Native Containerability and monitoring.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf

Api manager preconference

  • 1. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Developing and Managing API with Adobe ColdFusion and API Manager Kevin, Mayur, Pavan
  • 2. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Agenda  Use Case  Designing your API  API Manager Actors  Onboarding of the API  Building Blocks  Security  SLA  Analytics
  • 3. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API API Manager M E R C H A N T STORE ADMINISTRATOR C U S T O M E R
  • 4. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. E-commerce Store APIs 1. Product 2. Merchants 3. Order 4. Promotion 5. Payment Gateway
  • 5. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Product API Endpoints: Add a product (POST /products/v1 ) Get all products (GET /products/v1 ) Add/Update Brand (PUT /products/v1 ) Search product (GET /products/v1/search?searchid=123)
  • 6. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Merchant API Endpoints: Add a product (POST /merchant/v1/products/<merchant_id>) Update Product Price (PUT merchant/v1/products/<merchant_id>?product_id=101965 ) Update Product quantity (PUT merchant/v1/products/<merchant_id>?product_id=101965 ) Delete a product under merchant store (DELETE /merchant/v1/products/<merchant_id>? product_id=101965)
  • 7. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Order API Endpoints: Place a new Order ( POST /order/v1) Retrieve List of All Orders (GET /orders/v1/<customerId>) Update an Order (PUT /orders/v1/<orderid>) Delete a Single Order (DELETE /orders/v1/ /<customerId>/<orderid>)
  • 8. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Promotion API Endpoints: Create a promotion type (POST /promotion/v1) Create a discount code (POST /promotion/discount) Invalidate a discount code (PUT /promotion/discount/invalidate/<discount_code>) Retrieve List of promotions (GET /promotion/v1) 8
  • 9. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Payment Gateways Endpoints: Get all registered gateways (GET /gateway/v1) Disable a Gateway (PUT /gateway/v1/<gateway_id>) Enable a Gateway (PUT /promotion/v1/<gateway_id>) 9
  • 10. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Building API’s in ColdFusion  You can create REST services by defining certain attributes in the tags cfcomponent, cffunction, and cfargument and publish as REST resources. Script can also be used. • Follows HTTP request-response model: Beyond having HTTP as a medium, the service lets you follow all HTTP norms. The components published as REST services can be consumed over HTTP/HTTPS request. The REST services are identified with URI (Uniform Resource Identifier) and can be accessed from a web page as well as by specifying the URI in the browser's address bar. • Supports all HTTP methods : The REST enabled CFCs support the following HTTP methods: GET, POST, PUT, DELETE, HEAD, and OPTIONS. • Implicit handling of serialization/deserialization: ColdFusion natively supports JSON and XML serialization/deserialization. So client applications can consume REST services by issuing HTTP/HTTPS request. The response can either be serialized to XML or JSON format. • Publish web service as both REST service and WSDL service: You can create and publish the same ColdFusion component as a REST service and WSDL service. 10
  • 11. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. <cfcomponent>  Two arguments for the <cfcomponent> tag:  rest (true/false) – if true, the cfc is REST enabled.  restPath – path used to access the REST service.  Example:  <cfcomponent rest="true" restpath="/person"> 11 Sample URI: http://localhost:8500/rest/restTest/restService URL Component Description http://localhost:8500 Base URL which includes the IP address and port of the ColdFusion server.If you deploy ColdFusion as a JEE application, the URL will contain a context root, for example, http://localhost:8500*/cfusion* rest Implies that the request sent is a REST request.This default value can be renamed by revising the context path in web.xml available at cfusion/wwroot/WEB-INF and update the same mapping in uriworkermap.properties file found at configwsconfig1. restTest Application name or service mapping that you have used while registering the service in ColdFusion Administrator. If you do not specify a service mapping in the ColdFusion Administrator, then the application name is taken from Application.cfc. restService Rest path you defined in the service. That is, the value of the attribute restPath in the tag cfcomponent.
  • 12. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. <cffunction>  <cffunction>  restPath – specify to use a sub-resource path for the CFC.  httpMethod – the HTTP method to use  GET, POST, PUT, DELETE, HEAD, OPTIONS  Example:  <cffunction name="getPerson” returntype="string” access="remote” httpmethod="GET” restPath=“/person/{personID}” produces="application/json”> 12
  • 13. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. <cfargument>  <cfargument>  restArgSource – Where to find the value of the argument  path,query,form,cookie,header,matrix  restArgName – The name that can be mapped to the argument name.  Example:  <cfargument name=”personID" required="true" type="numeric" restargsource="path" /> 13
  • 14. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Registering an application with the REST service  After you create the CFC you want to REST-enable, specify the folder for registering as web service either using the autoRegister Application setting, the function restInitAplication() or in the ColdFusion Administrator or using the ColdFusion Admin API.  If you are in a shared environment:  <cfset this.restsettings.autoregister = true />  restInitApplication(rootPath[,serviceMapping[,options]])  These options not require administrator privileges. 14
  • 15. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. REST Responses 15 Default Response Description 200 OK Sent if the response has a body. 204 No Content Sent if the response doesn’t have a body. Default Response Description 404 Not Found Request URL is not valid 406 Not Acceptable No function in the REST service can produce the MIME type requested by the client 415 Unsupported Media Type A resource is unable to consume the MIME type of the client request 405 Method not allowed If the client invokes an HTTP method on a valid URI to which the request HTTP method is not bound. Custom responses can be created using the restSetResponse method for success or <cfthrow type=“RestError”> for errors.
  • 16. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Areas I look into: Web Services (SOAP, REST) , PDF, Spreadsheet API Manager Hobbies: Working on DIY projects Of course watching TV Series (GOT !!! ) Adobe ColdFusion TeamI AM AN ENGINEER
  • 17. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API API Manager M E R C H A N T STORE ADMINISTRATOR C U S T O M E R
  • 18. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. E-commerce Store APIs 1. Product 2. Merchants 3. Order 4. Promotion 5. Payment Gateway
  • 19. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Manager Actors 19 ADMINISTRATOR PUBLISHER API Developer SUBSCRIBER APP Creator
  • 20. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Onboarding the API  Manual API Creation  CF Discovery  Swagger Import  Soap to Rest  Soap Pass Through
  • 21. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21
  • 22. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Manager Building Blocks  API Visibility  API Versioning  API Life cycle  Security  SLA  Caching  Analytics
  • 23. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Visibility  Public  Partner  Intranet
  • 24. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Versioning Upgrade APIs without worrying about backward compatibility by managing multiple versions using a single platform.
  • 25. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Life cycle  Draft  Published  Deprecate  Retire 25
  • 26. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Caching 26 During experiments, Many bird species store peanuts in a cache for later retrieval. In the wild, these birds store acorns and insects. Wikipedia
  • 27. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. About me Developer & Security Evangelist at Adobe Previously Security Consultant at RSA Security Movie Buff Email: [email protected]
  • 28. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API Security 28 Identity Authentication Authorization
  • 29. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. User Store and API Security  API Security  API Key  Basic  OAuth2 and OAuth2 with SAML  User Store  LDAP  Data Base  SAML
  • 30. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. API/APP Key Authentication  Suitable for Business to Business Sharing  Application Identification 30
  • 31. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Authentication (Who say you are) 31  How to Bring in the Users ? (User Stores)  LDAP  DATABASE  SAML  Administrator can configure user stores.
  • 32. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sample User Store: Database 32
  • 33. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. BASIC Authentication  Simplest & Standard form of authenticating  Auth happens via username & password.  Pass Username & password in each request  Requires HTTPS  Application Should securely store the password 33
  • 34. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. When it is not Enough!!!!  Password Anti Pattern  Trust Issues – Third Party Apps  Can’t Revoke Application  No Selective Data Sharing 34
  • 35. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. An open protocol to allow secureauthorization in a simple and standard method from web, mobile and desktop applications. Introducing
  • 36. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resource Owner: the person or theapplication that holds the data to be shared. Resource Server: the application that holdsthe protected resources. Authorization Server: the application that verifies the identity of the users. Client: the application that makes requests to RS on behalf of RO. OAuth 2.0: Actors
  • 37. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resource Owner: the person or the application that holds the data to be shared. Resource Server: the application that holdsthe protected resources. Authorization Server: the application that verifies the identity of the users. Client: the application that makes requests to RS on behalf of RO. OAuth 2.0: Actors
  • 38. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resource Owner: the person or the application that holds the data to be shared. Resource Server: the application that holds the protected resources. Authorization Server: the application that verifies the identity of the users. Client: the application that makes requests to RS on behalf of RO. OAuth 2.0: Actors
  • 39. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resource Owner: the person or the application that holds the data to be shared. Resource Server: the application that holds the protected resources. Authorization Server: the application that verifies the identity of the users. Client: the application that makes requests to RS on behalf of RO. OAuth 2.0: Actors
  • 40. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. I want to see a list of games Protocol Flow
  • 41. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hey, API Manager, could you please give me a list of games? Protocol Flow
  • 42. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow Sorry Pal, This is a secured API. Provide me an Access Token.
  • 43. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow @alvaro_sanchez
  • 44. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow @alvaro_sanchez
  • 45. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow Hi, Could you provide me your username & password ?
  • 46. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Here you go. My username is [email protected] and password is top- secret Protocol Flow
  • 47. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow @alvaro_sanchez
  • 48. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hi API Manager, here is my token: 7ee85874dde4c7235b6c3afc82e3fb Protocol Flow
  • 49. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow Hi, I have been given the token 7ee85874dde4c7235b6c3afc82e3fb. Is it Legitimate ?
  • 50. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Protocol Flow Of Course. The Token is valid & it belongs to [email protected]
  • 51. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. All Well!!. Here is the list of games Protocol Flow
  • 52. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Here you are the list of games. Have a goodday! Protocol Flow
  • 53. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. OAuth 2.0 isa delegation protocol, as this guy has no idea about the credentials of this guy Protocol Flow
  • 54. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. SLA  SLA Plans  Rate Limiting  Throttling  HARD and SOFT Limit
  • 55. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 55
  • 56. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Analytics  Administrator Analytics  Publisher Analytics  Subscriber Analytics
  • 57. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Recap - APIs – From concept to Go-To-Market Step 1 Define your business objectives 58 Step 2 Design your API Step 3 On-board your API Step 4 Manage your API Step 5 Secure your API Step 6 Engage Customers Step 7 Measure impact
  • 58. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 59