用于添加到 Azure API 管理中的通知列表的 REST API 是否已更改?
Has REST API for adding to notification list in Azure API Management changed?
这与以下堆栈溢出问题有关:
以上建议一度奏效。但是,我现在调用它时收到 http 401 错误。它改变了吗?这是我正在使用的 PowerShell 代码:
# Add emails
$emailArray = $QuotaLimitNotificationList -split ','
foreach($email in $emailArray)
{
$email = $email.Trim()
# Build the URL
$resourcePath = $Nid + "/recipients/emails/" + $email + "?api-version=" + $apiVersion
$url = "https://$urlHost/$resourcePath"
$u
# Make the REST call
Invoke-RestMethod -Method Put -Uri $url -Header @{ "Authorization" = $apiKey; "Content-Type" = $contentType }
}
是的,Api 已更改以确认 Azure REST 准则。我们现在要记录整个集合,然后它不会改变。在这里解锁你是新路径
GET /notifications/{nid}/recipientEmails
- 获取订阅通知的电子邮件收件人列表
GET /notifications/{nid}/recipientUsers
- 获取订阅通知的用户收件人列表
这与以下堆栈溢出问题有关:
以上建议一度奏效。但是,我现在调用它时收到 http 401 错误。它改变了吗?这是我正在使用的 PowerShell 代码:
# Add emails
$emailArray = $QuotaLimitNotificationList -split ','
foreach($email in $emailArray)
{
$email = $email.Trim()
# Build the URL
$resourcePath = $Nid + "/recipients/emails/" + $email + "?api-version=" + $apiVersion
$url = "https://$urlHost/$resourcePath"
$u
# Make the REST call
Invoke-RestMethod -Method Put -Uri $url -Header @{ "Authorization" = $apiKey; "Content-Type" = $contentType }
}
是的,Api 已更改以确认 Azure REST 准则。我们现在要记录整个集合,然后它不会改变。在这里解锁你是新路径
GET /notifications/{nid}/recipientEmails
- 获取订阅通知的电子邮件收件人列表
GET /notifications/{nid}/recipientUsers
- 获取订阅通知的用户收件人列表