问题
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