有没有办法获得问候清单?我得到了一个"方法不允许"尝试调用此端点的响应。这是您需要在Beta计划中注册的另一个端点吗?
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting
我想使用这些ID来使用POST
API更新问候语:
POST /restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting/{greetingId}
答案 0 :(得分:0)
问候与特定的回答规则相关联,您无法重复使用它们,因此没有真正的理由获得问候列表。话虽这么说,您可以通过调用Answering Rule API来枚举系统中的问候语。
<强>枚举强>
您可以通过调用答案规则的API来查看问候语。此示例显示1个带有一组默认问候语的自定义问候语。
GET /restapi/v1.0/account/~/extension/~/answering-rule/{answeringRuleId}
响应将有一组问候,如下面的摘录所示:
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/answering-rule/business-hours-rule",
"id": "business-hours-rule",
"type": "BusinessHours",
"enabled": true,
"schedule": {
"ref": "BusinessHours"
},
"greetings": [
{
"type": "Voicemail",
"custom": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/greeting/33333333",
"id": "33333333"
}
},
{
"type": "Introductory",
"preset": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/66301",
"id": "66301",
"name": "None"
}
},
{
"type": "ConnectingAudio",
"preset": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/66310",
"id": "66310",
"name": "Acoustic"
}
},
{
"type": "ConnectingMessage",
"preset": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/68867",
"id": "68867",
"name": "Default"
}
},
{
"type": "HoldMusic",
"preset": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/197382",
"id": "197382",
"name": "Acoustic"
}
}
],
您可以通过调用answeringRuleId
端点获取answering-rule
值列表。这将包括您的business-hours-rule
和after-hours-rule
ID以及您的自定义回答规则:
GET /restapi/v1.0/account/~/extension/~/answering-rule
<强>删除强>
只要不再引用问候语,就不能重复使用问候语并将其从系统中删除。您可以通过使用其他问候语更新规则或删除规则来执行此操作。