通过REST API为Azure API管理服务获取apim用户git secret [英] Attain apim user git secret through REST API for Azure API Management Service
问题描述
在遵循文档之后,实际上没有一种明确的方法可以在azure门户网站UI之外生成用于API管理的Git用户'apim'秘密。
一旦我收到租户用户的git凭证
GET https://management.azure.com/subscriptions/sub#/resourceGroups/myrg/providers/Microsoft.ApiManagement/service/myservice/tenant/access/?api-version=2018- 06-01-preview
回复:
{
  " id":" integration",$
  " primaryKey":" key1",&
  " secondaryKey":" key2",&
  "启用":真实
}
为apim用户生成令牌的下一步是什么,然后接收克隆repo的url。
为了生成令牌,我们需要在REST API调用下面使用 {userId}的值等于git 。
它记录在User - Get Shared Access Token。
下
https://docs.microsoft.com/en-us/rest/api/apimanagement/user/getsharedaccesstoken
After following the documentation there isn't really a clear way to generate Git user 'apim' secret for API management outside of the azure portal UI.
Once I receive the git credentials for the tenant user
GET https://management.azure.com/subscriptions/sub#/resourceGroups/myrg/providers/Microsoft.ApiManagement/service/myservice/tenant/access/?api-version=2018-06-01-preview
Response:
"id": "integration",
"primaryKey": "key1",
"secondaryKey": "key2",
"enabled": true
}
What is the next step to generate the tokens for the apim user then receive the url to clone the repo.
For generating the token we need to use below REST API call with value of {userId} equal to git.
It is documented under User - Get Shared Access Token.
https://docs.microsoft.com/en-us/rest/api/apimanagement/user/getsharedaccesstoken
这篇关于通过REST API为Azure API管理服务获取apim用户git secret的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!