Tools, FAQ, Tutorials:
Operation Setting: 'Rewrite URL template' - 2017 Version
How to use the API operation 2017 version setting "Rewrite URL template"?
✍: FYIcenter.com
The API operation setting "Rewrite URL template" is used to override the "URL template" setting, when constructing the final URL to call the backend service.
By default, Azure will construct the final URL by appending the URL template defined at the operation level to the backend Web service URL defined at the API level.
For example, if you create an API with the following settings:
Web service URL: http://dev.fyicenter.com/services Web API URL suffix: first Your API service URL: https://fyicenter.azure-api.net/first
Then you add an operation with the following settings, leaving the "Rewrite URL" field empty:
HTTP verb: POST URL template: /users Rewrite URL template:
When client system calls your Azure API service operation at:
https://fyicenter.azure-api.net/fist/users
Azure will forward the call to your backend service with this final URL:
http://dev.fyicenter.com/services/users Constructed by: <Web service URL> + <URL template> = "http://dev.fyicenter.com/services" + "/users"
But if you set "Rewrite URL" field to "/users", like:
HTTP verb: POST URL template: /users Rewrite URL template: /profiles
Azure will forward the call to your backend service with this final URL:
http://dev.fyicenter.com/services/users Constructed by: <Web service URL> + <Rewrite URL template> = "http://dev.fyicenter.com/services" + "/profiles"
⇒ Add API to API Products - 2017 Version
⇐ Add Operation to API on Publisher Portal - 2017 Version
2018-03-31, 2843🔥, 0💬
Popular Posts:
What Is HTML? HTML (HyperText Markup Language) is the standard markup language for creating Web page...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
How to login to Azure API Management Publisher Dashboard? If you have given access permission to an ...