-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Feature requirement
It requires SDK support when invoking REST API: to successfully call Web PubSub through APIM, the request URL should be the APIM URL, while the aud of JWT token should be Web PubSub URL.
How to integrate with API Management service
-
Create the API Management service using default settings following https://docs.microsoft.com/en-us/azure/api-management/get-started-create-service-instance
-
Go to APIs => Create from definition => OpenAPI
a. OpenAPI specification: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/webpubsub/data-plane/WebPubSub/preview/2021-05-01-preview/webpubsub.json
b. Create

-
Settings
a. set Web service URL to the Web PubSub service URL:https://xxxx.webpubsub.azure.com
b. Uncheck Subscription required (for quick test purpose)
c. Others remain default settings
d. Save

-
All set, now let's test the API
a. Use the Test tab, choose the APIHEAD Get service health status.which does not require Auth, it should return Response 200 OK

b. Test if the API Management service works, try using the APIM URL
https://xxxx.azure-api.netto invoke the health check:
In terminal,
batch curl https://xxxx.azure-api.net/api/health?api-version=2021-05-01-preview --head
It should return HTTP/1.1 200 OK
