使用api管理以编程方式创建api密钥,订阅我的web应用程序api [英] Programatically create api key using api management with subscriptions for a my web app api

查看:92
本文介绍了使用api管理以编程方式创建api密钥,订阅我的web应用程序api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我有一个Nodejs应用程序。我想向开发人员公开我的api的端点。 

 I hava a Nodejs app. I would like to expose an endpoint of my api to developers. 

我使用cosmos db作为后端。我遇到了API管理。 

I use cosmos db for the backend. I came across API management. 

我想知道如何以编程方式为注册我的api并让他们访问端点的开发人员生成API密钥。 

I would like to know how to programatically generate API keys for developers who signup for my api and give them access to the endpoint. 

在浏览API管理文档后,我遇到了订阅,但我如何以编程方式执行此操作。

After going through API management documentation I came across Subscriptions but how do I do this programatically.

欢迎任何文档和示例。

推荐答案

您可以通过编程方式生成API密钥 使用

You can generate API Keys programmatically by using

同样在非消费层中subscriptio API Management中的ns始终与单个API产品范围相关联。

Also in non-Consumption tiers subscriptions in API Management were always associated with a single API product scope.

在消费层中,
订阅范围
不再局限于API产品。现在可以创建允许访问API的密钥,或API管理实例中的所有API,而无需先创建产品并将API添加到其中。

In consumption tier, the scope of subscriptions is no longer limited to an API product. It's now possible to create keys that grant access to an API, or all APIs within an API Management instance, without needing to create a product and add the APIs to it first.





这篇关于使用api管理以编程方式创建api密钥,订阅我的web应用程序api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆