azurepolicyazure-api-managementazure-api-apps

Azure API Management gateway transformation policy


Is it possible to convert JSON response objects (Null,int etc) to type string by applying transformation policy? Thanks in advance


Solution

  • I would suggest you use this https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#SetBody policy. This policy will let you to write code to set body. You need to convert body to JSObject, then set properties as you request and then set JSObject back to body and let us know how it goes.