Based on
Azure API Management Service "Set body" Policy
We can modify the response of an API service. For Eg., instead of returning below :
{
"company" : "Azure",
"service" : "API Management"
}
We would only like to return :
{ "company" : "Azure" }
I am not sure how to accomplish this as I have no idea what kind of programming language / syntax they are using in their documentation as shown below :
<set-body>
@{
string inBody = context.Request.Body.As<string>(preserveContent: true);
if (inBody[0] =='c') {
inBody[0] = 'm';
}
return inBody;
}
</set-body>