Custom Replacer
webMethods 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 theheaderKey
from the request headers.${request.query.queryKey}
: To replace the value of thequeryKey
from the query parameters in the request URL.${request.body.JsonPath|XPath}
: To replace the value of theJsonPath|XPath
from the request body.