Tools, FAQ, Tutorials:
Using the 'context' Object in Policy Expressions
How to use the built-in "context" object in Policy expressions?
✍: FYIcenter.com
The built-in "context" object can be used any "@(...)" expressions or "@{...}" expression blocks.
The "context" object allows you to access information related to Azure API operation
through its properties and methods.
Here are some examples "context" properties and methods:
@(context.Api.Name) - Returns the name of this API. @(context.Operation.UrlTemplate) - Returns the URI template of this operation. @(context.Request.Method) - Returns the method verb of the request. @(context.Response.Body.As<JObject>()) - Converts the response body into a JSON Object.
For more information on the built-in "context" object, see API Management policy expressions Website.
Â
⇒ 'context.Request.MatchedParameters' URL Template Parameters
2018-02-14, 1564👍, 0💬
Popular Posts:
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...
How To Add Column Headers to a Table? If you want to add column headers to a table, you need to use ...