-1

In Azure API management , how to change the backend service base url for each operations in single azure api instances

i tried

operation 1 dev

operation 2 test

operation 1 and operation 2 are under same azure API

and i got error error

any one have ideas/suggestions

  • 1
    Hi, 404 error means the endpoint is not available. Go to the APIM trace (you can find that in Test section) and check what backend URL is called and if it is correct – Pankaj More Jan 04 '22 at 08:45
  • Actually i want to change the relative path of my backend url . for ex my backend url is https://azure.websites.net/api/dev then for operation 2 (refer my original post) i should change the backend url as https://azure.websites.net/api/qa – arthi athithan Jan 04 '22 at 09:47
  • Even i tried with but it is appending in the backend url as https://azure.websites.net/api/dev/qa – arthi athithan Jan 04 '22 at 09:54
  • Does this answer your question? [Azure APIM "rewrite-uri" policy - How to remove the URL suffix?](https://stackoverflow.com/questions/54314693/azure-apim-rewrite-uri-policy-how-to-remove-the-url-suffix) – Ecstasy Jan 05 '22 at 05:21
  • You can refer to [Set backend service](https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#SetBackendService), [Rewrite URL](https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#RewriteURL) and [Azure API Management "rewrite-uri"](https://stackoverflow.com/questions/68263679/azure-api-management-rewrite-uri) – Ecstasy Jan 05 '22 at 05:22
  • Thanks @DeepDave-MT i went through the links i used set backend service and rewrite uri to achieve my need – arthi athithan Jan 10 '22 at 11:15
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 11 '22 at 06:28

1 Answers1

0

i used below template

policy

so the backend service url changed to https://xxx.azurewebsites.net/api/dev