How to validate a JSON is in correct format in Azure APIM

Arun Kumar KS 31 Reputation points
2022-07-01T10:30:27.017+00:00

How can I validate a JSON request body in APIM and return BadRequest if the JSON is not in correct format?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,805 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sujithreddy Komma 571 Reputation points Microsoft Employee
    2022-07-01T12:13:27.157+00:00

    Hi Arun,

    Can toy Please look into the Validate-Content Policy ? Here is the info

    https://learn.microsoft.com/en-us/azure/api-management/validation-policies#schemas-for-content-validation

    Let us know fi you need more details