Issue with "runtime" keyword on JSON request through APIM

63 views Asked by At

I'm having trouble trying to receive a request through Azure APIM. The problem only happends when I send a JSON body with the word "runtime" in it, for example:

{
  "id": 1,
  "company_name": "runtime something"
}

I've traced the requests and when it tries to reach the API backend something happens and the entire API backend restarts. The request doesn't reach the backend. I think that it is a security measure from the Azure/APIM part, but I'm not sure.

The thing is: we have to receive this "runtime" string as it is part of a client's company name.

Strange thing is that it only happens in APIM. If we try to send the same JSON through the backend's IP, it works.

We found a workaround but it's not what we want to do for every endpoint. Instead of asking for a class with all the required fields, we ask for a generic object and then, inside the controller, we try to convert it to the class we were expecting before.

The backend is in C# and runs on an Azure container.

Can someone help us?

Thanks

1

There are 1 answers

2
Ikhtesam Afrin On

I have created a Http Triggered function and imported to APIM.

This function expects a parameter either in request body or as a query parameter.

I am testing the function in APIM as shown below-

enter image description here enter image description here

The request doesn't reach the backend. I think that it is a security measure from the Azure/APIM part, but I'm not sure.

Here I am passing name as runtime something and got expected result. AFAIK, APIM is not blocking runtime keyword.