Azure API Manager expose all to public, get rid of

2019-05-17 18:25发布

问题:

I have some REST API that is proxied over Azure API Management. For some reason I'd like make it available public for all requests. From developer point of view I would like to get rid of setting key in header (or request):

Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is it ever possible?

回答1:

Create a new product and make sure to unckeck "require subscription" in its settings. Add your api to that product and publish it.

Such products are called Open. And any API included in any open product will not require subscription key to be invoked. If API is included into both open and non-open product it will accept subscription key if given, but would not require it still.

Mind that without subscription keys it is impossible to collect any per-used call statistics, thus all such calls would be attributed to Anonymous user.