用于添加到Azure API Management中的通知列表的REST API是否已更改?

时间:2017-06-20 19:10:32

标签: rest powershell azure azure-api-management

这与以下堆栈溢出问题有关:adding to notification list

以上建议有效。但是,当我调用它时,我现在收到一个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 }
}

1 个答案:

答案 0 :(得分:1)

是的,Api已更改为确认Azure REST准则。我们现在要记录整个集合,然后它不会改变。要解锁你,这里是新路径

GET /notifications/{nid}/recipientEmails - 获取订阅通知的电子邮件收件人列表 GET /notifications/{nid}/recipientUsers - 获取订阅通知的用户收件人列表