I am trying to configure a azure apim websocket endpoint .
Below are the steps I tried
- created a websocket endpoint
- configured the settings as below
websocket url : wss://app.square.ai:5001/CustomerActionHub/51 Url suffix : exam/CustomerActionHub/51
The above steps are working fine when I create it as static.
Now I have to configure in such a way where the above value 51 will change dynamically. How do I achieve that
below is the setting i tried but its throwing error
You can use the below policy to accept the value as a query parameter while sending the request.
You can also use
rewrite-uri
but in case of WebSocket APIs, its not giving expected result. AFAIK, it might be because WebSocket APIs in Azure APIM is currently in public preview as per this MS Docs.In my case I have used above policy to establish a connection with Azure PubSub Service and I am sending Hub Name in query parameter as shown below.
As a workaround, you can use the above given policy and meanwhile you can also check with the Product team for any further details.