How can I get a user's call queue / department?

扶醉桌前 提交于 2019-12-25 03:09:07

问题


If I have a user's extensionId, how can I get the user's call queue / department info, e.g. a specific team like "department": "Sales".

I know I can call the following endpoint and get a list of call queues / departments using the following, but I want a list specific to a user:

List Call Queues API

GET /restapi/v1.0/account/{accountId}/call-queues

Get Extension List API

GET /restapi/v1.0/account/{accountId}/extension?type=Department

回答1:


A user can be a member of multiple call queues. To get a list, call the user's extension info endpoint and look for the departments property in the JSON response body.

Request:

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

Response:

The response will have a number of properties. The below is an excerpt that shows the department property.

{
    "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222",
    "id": 22222222,
    "extensionNumber": "102",
    "name": "Tiger RingForce",
    "type": "User",
    "status": "Enabled",
    "departments": [
        {
            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/33333333",
            "id": "33333333",
            "extensionNumber": "201"
        },
        {
            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/44444444",
            "id": "44444444",
            "extensionNumber": "202"
        }
    ],
    ...
}


来源:https://stackoverflow.com/questions/51523000/how-can-i-get-a-users-call-queue-department

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!