-
Notifications
You must be signed in to change notification settings - Fork 4
API Rewrite Rules
This page captures the rewrite rules used to enable the Delivery Server API URL structure.
If Delivery Server is set up behind IIS7, you will probably have used Application Request Routing (ARR) - see http://dannybaggs.wordpress.com/2010/05/14/iis7-tomcat-application-request-routing/.
Within this setup, there will be a server farm and you can choose to delegate certain HTTP requests to the Delivery Server (within Tomcat) behind IIS through the use of rewrite rules.
The following rules are used with the API project currently in the following priority order:
N.B. IIS7 RegEx patterns are sometimes subtly different from how they would be using Apache or Helicon
All of the following rules use the "Route to Server Farm" action type and "Stop processing of subsequent rules" is checked.
API calls with version number and sub function
Pattern: ^/?api/([0-9\.]+)/([^/]+)/([^/]+)[\.|/](xml|json)$
Path: /cps/rde/xchg/rest/{R:2}.{R:3}_{R:4}_{R:1}.xsl/{R:2}.{R:3}_{R:1}.xml?format={R:4}
API calls with version number
Pattern: ^/?api/([0-9\.]+)/([^/]+)[\.|/](xml|json)$
Path: /cps/rde/xchg/rest/{R:2}_{R:3}_{R:1}.xsl/{R:2}_{R:1}.xml?format={R:3}
API fallback call without version number
Pattern: ^/?api/([^/]+)/([^/]+)[\.|/](xml|json)$
Path: /cps/rde/xchg/rest/{R:3}.xsl/{R:1}.{R:2}.xml?format={R:3}
API fallback call without version number
Pattern: ^/?api/([^/]+)[\.|/](xml|json)$
Path: /cps/rde/xchg/rest/{R:2}.xsl/{R:1}.xml?format={R:2}
Default API base
Pattern: /?
Path: /cps/rde/xchg/rest