locked
Set-backend-service vs. URL Rewrite RRS feed

  • Question

  • Hi All,

    I have two versions of services running under the two operations APIs -

    https://..../someoperation/v1/ - URL for version 1.
    https://..../someoperation/v2/ - URL for version 2.

    I want to divert all calls from version 1 to version 2.

    Guess I have two options for this

    Option 1: Create a Policy which would set-backend-service base-url to point to the V2 deployment.
    Option 2: Set URL rewrite on /someoperation/v1/ to /someoperation/v2/

    Which is the preferred way and why?

    Thanks,
    Sankaranarayanan MG

    Tuesday, December 6, 2016 8:00 PM

Answers

  • Hello,

     

    Greetings.

     

    Sorry for the delay in response.

     

    We Checked your query with our technical team team and as per them the policies do different things. Set backend changes the host name while rewrite URL changes the rest of the URL. Going by the information provided about the target URLs, rewrite URL is the policy to use in this case.

     

    Hope this helps!

     

    Regards,

    _______________________________________________________________________________________________________

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

     

    • Proposed as answer by Swikruti Bose Tuesday, January 17, 2017 11:55 AM
    • Marked as answer by Sjoukje ZaalMVP Tuesday, March 21, 2017 8:02 PM
    Saturday, December 10, 2016 3:22 AM

All replies

  • Hi,

    Thanks for posting here.

    Please go through the below link which may help you mean while we are researching on it and get back to you soon with an update.

    https://docs.microsoft.com/en-us/azure/api-management/api-management-policy-reference

    Hope this helps!

    Regards,

    _______________________________________________________________________________________________________

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

     

    Wednesday, December 7, 2016 9:30 AM
  • Hello,

     

    Greetings.

     

    Sorry for the delay in response.

     

    We Checked your query with our technical team team and as per them the policies do different things. Set backend changes the host name while rewrite URL changes the rest of the URL. Going by the information provided about the target URLs, rewrite URL is the policy to use in this case.

     

    Hope this helps!

     

    Regards,

    _______________________________________________________________________________________________________

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

     

    • Proposed as answer by Swikruti Bose Tuesday, January 17, 2017 11:55 AM
    • Marked as answer by Sjoukje ZaalMVP Tuesday, March 21, 2017 8:02 PM
    Saturday, December 10, 2016 3:22 AM