How can we improve Azure API Management?

Handle query parameters correctly.

I have an API defined, which takes query parameter and depending on the type of query parameter passed, it behaves differently. To be precise it is Asp.Net Web API and it calls different methods/operations depending on the query parameters e.g., below two call will execute different methods of the controller.

/Api/DoSomething?Page=1
/Api/DoSomething?ID=1

It works fine for the first URI but when I call the second URI it passes both the query parameters to it Page and ID, which fails the routing as it doesn't get the match. Of course, value of the Page is passed as null.

I can make this work only by URL rewriting, which doesn't seem to be the elegant way to do it e.g.,

/Api/DoSomething/ByPage?Page=1
/Api/DoSomething/ByID?ID=1

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Sajad DeyargarooSajad Deyargaroo shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base