查询群语音信箱列表

查询群语音信箱列表。

请求 URL

GET {base_url}/{api_path}/vm_group/list?access_token={access_token}

请求参数

参数 是否必填 类型 说明
page Integer 定义显示第几个页面。
page_size Integer 定义每页显示几项查询结果。
sort_by String 定义排序字段。

取值范围

  • id:群语音信箱 ID。
  • number:群语音信箱号码。
  • name:群语音信箱名称。
  • type:群语音信箱类型。
  • mode:群语音信箱模式。
order_by String 定义显示顺序。

取值范围

  • asc:升序
  • desc:降序

响应参数

Parameter Type Description
errcode Integer 返回错误码。
  • 0:请求成功。
  • 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息
errmsg String 返回信息。
  • SUCCESS:请求成功。
  • FAILURE:请求失败。
total_number Integer 群语音信箱的总数。
vm_group_list Array <Group_Voicemail> 每个群语音信箱的基本信息。
Group_Voicemail
参数 类型 说明
id Integer 群语音信箱 ID。
type String 群语音信箱类型。
  • ring_group:响铃组。
  • queue:队列。
  • custom:自定义。
number String 群语音信箱号码。
name String 群语音信箱名称。
mode String 群语音信箱模式。
  • broadcast:语音留言未存储在群语音信箱中,而是直接转发到每个成员个人的分机语音信箱中。
  • share:语音留言存储在群语音信箱中,所有成员共享留言信息。
member_list Array <Group_Voicemail_Member 群语音信箱中每个成员的信息。
messages Object <Voicemail_Message> 群语音信箱中留言的信息。
Group_Voicemail_Member
参数 类型 说明
value String 成员 ID。
type String 成员类型。
  • extension:分机。
  • ext_group:分机组。
text String 成员名称
text2 String 该参数的定义取决于 type 的取值。
  • 如果 typeextension,该参数表示分机号码。
  • 如果 typeext_group,该参数表示分机组的名称。

Voicemail_Message

参数 类型 说明
total Integer 留言总数。
unread Integer 未读留言的数量。

示例

请求示例

GET /openapi/v1.0/vm_group/list?access_token=UIFGAl0HUpg8i78V0Z6nCx5YghKqE235 HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
响应示例
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 3,
    "vm_group_list": [
        {
            "id": 1,
            "type": "ring_group",
            "number": "6300",
            "name": "Technical Support Team 2",
            "mode": "share",
            "member_list": [
                {
                    "text": "Evelyn",
                    "text2": "3200",
                    "value": "3071",
                    "type": "extension"
                },
                {
                    "text": "Dave Haris",
                    "text2": "3202",
                    "value": "3074",
                    "type": "extension"
                },
                {
                    "text": "Terrell Smith",
                    "text2": "3021",
                    "value": "3075",
                    "type": "extension"
                }
            ],
            "messages": {
                "unread": 12,
                "total": 30
            }
        },
        {
            "id": 2,
            "type": "custom",
            "number": "6100",
            "name": "6100",
            "mode": "share",
            "member_list": [
                {
                    "text": "Evelyn",
                    "text2": "3200",
                    "value": "3071",
                    "type": "extension"
                }
            ],
            "messages": {
                "unread": 5,
                "total": 20
            }
        },
        {
            "id": 3,
            "type": "queue",
            "number": "6401",
            "name": "6401",
            "mode": "share",
            "member_list": [
                {
                    "text": "Dave Haris",
                    "text2": "3202",
                    "value": "3074",
                    "type": "extension"
                },
                {
                    "text": "Terrell Smith",
                    "text2": "3021",
                    "value": "3075",
                    "type": "extension"
                }
            ],
            "messages": {
                "unread": 0,
                "total": 10
            }
        }
    ]
}