简体   繁体   English

如何列出RingCentral问候?

[英]How to List RingCentral Greetings?

Is there a way to get a list of greetings? 有没有办法得到问候清单? I got a "Method Not Allowed" response trying to call this endpoint. 我收到一个“方法不允许”响应,试图调用此端点。 Is this another one of those endpoints where you need to be registered in the Beta program? 这是您需要在Beta程序中注册的其他端点之一吗?

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting

I want to use these ids to update greetings using the POST API: 我想使用这些ID通过POST API更新问候语:

POST /restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting/{greetingId}

Greetings are associated specific answering rule and you cannot reuse them so there's no real reason to get a list of greetings. 问候语与特定的应答规则相关,您不能重复使用它们,因此没有真正的理由来获取问候语列表。 That being said, you can enumerate the greetings in your system by calling the Answering Rule API. 话虽如此,您可以通过调用Answering Rule API来枚举系统中的问候语。

Enumeration 列举

You can view your greetings by calling the API for your answering rule. 您可以通过调用回答规则的API查看问候语。 This example shows 1 custom greeting with a set of default greetings. 本示例显示1个自定义问候语和一组默认问候语。

GET /restapi/v1.0/account/~/extension/~/answering-rule/{answeringRuleId}

The response will have a set of greetings as show in the excerpt below: 响应将有一组问候,如以下摘录所示:

{
    "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"
            }
        }
    ],

You can get a list of your answeringRuleId values by calling the answering-rule endpoint. 您可以通过调用answering-rule端点来获取answeringRuleId值的列表。 This will include both your business-hours-rule and after-hours-rule ids as well as your custom answering rules: 这将包括您business-hours-ruleafter-hours-rule ID,以及您的自定义回答规则:

GET /restapi/v1.0/account/~/extension/~/answering-rule

Deletion 删除中

Greetings cannot be reused and are deleted from the system as long as they are no longer referenced. 只要问候语不再被引用,就不能重复使用并从系统中删除问候语。 You can do this by either updating the rule with a different greeting or deleting the rule. 您可以通过使用不同的问候语更新规则或删除规则来做到这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM