问候语与特定的回答规则相关联,您不能重复使用它们,因此没有真正的理由获取问候语列表。话虽如此,您可以通过调用应答规则 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
删除
问候语不能重复使用,只要不再被引用,就会从系统中删除。您可以通过使用不同的问候语更新规则或删除规则来执行此操作。