API Management 10.4 | Using API Gateway | APIs | API Mocking | Custom Replacer
 
Custom Replacer
API Gateway allows you to send a dynamic custom response instead of a static mocked response to the consumer when the mocked API is invoked. In the mocked response, you can specify multiple custom replacers. Custom replacer is used to replace the custom variables with the values defined in the request headers, query parameters, and request body. The custom replacer is available in the ${request.<ConditionParameter>.<Key|JsonPath|XPath>} format. The custom replacers are:
*${request.header.<headerKey>}: To replace the value of the headerKey from the request headers.
*${request.query.<queryKey>}: To replace the value of the queryKey from the query parameters in the request URL.
*${request.body.<JsonPath|XPath>}: To replace the value of the <JsonPath|XPath> from the request body.

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release