api:pbx:app:dashboards:update
Table of Contents
API : PBX : APP : Dashboard Update
Introduction
This request will update an existing dashboard.
Dashboards are user-specific, used in the Communicator desktop application.
Request
| URL | https://api.telecomx.dk/pbx/app/dashboard/DASH_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | PERSONAL if dashboard belongs to the user VIEWER, MANAGER, OWNER if dashboard belongs to an employee RESELLER if dashboard belongs to a customers employee ADMIN. |
||
| Params | DASH_ID | Id | Id of the dashboard to update. |
| Body | name | String | Name of the dashboard. |
| group | Id | [Optional] Id of a PBX group, the employees extension must be a member of to view this dashboard. Null when not shared. |
|
| topbar | Number | Priority in the topbar, 0=do not display in topbar, 1-5 positional priority | |
| items | Array | List of items on the dashboard. | |
| items[].column | Number | 0-based index of column the item belongs to. | |
| items[].position | Number | 0-based index of the position of the item in the column. | |
| items[].type | String | Type of item: MYCALLS, QUEUE, MULTIQUEUE, EXTENSIONS, WEB, SWITCHVAR, SHORTCUTS. | |
| When type is MYCALLS | |||
| items[].maxCalls | Number | Max number of calls to show before scrolling. | |
| items[].variable | String | Optional name of variable to show with the call data. | |
| items[].variableName | String | Optional label to prefix the variable with. | |
| When type is QUEUE | |||
| items[]._id | Id | Id of queue to show. | |
| items[].variable | String | Optional name of variable to show with the call data. | |
| items[].variableName | String | Optional label to prefix the variable with. | |
| items[].showCalls | Boolean | True to show calls waiting in the queue. | |
| items[].showMembers | Boolean | True to show members of the queue. | |
| items[].showStats | Boolean | True to show mini queue stats for the day. | |
| items[].maxCalls | Number | Max number of calls to show before scrolling. | |
| items[].maxMembers | Number | Max number of members to show before scrolling. | |
| items[].stats | Array | List of statistics properties to show: NOMEMBERS, ALLBUSY, TIMEOUT, CANCELLED, ANSWERED, UNANSWERED, TOTAL, AVERAGEWAITTIME, AVERAGETALKTIME, TOTALTALKTIME, LONGESTWAITTIME, LASTWAITTIME. | |
| When type is MULTIQUEUE | |||
| items[]._ids | Array | Ids of queues to show. | |
| items[].variable | String | Optional name of variable to show with the call data. | |
| items[].variableName | String | Optional label to prefix the variable with. | |
| items[].showCalls | Boolean | True to show calls waiting in the queue. | |
| items[].showMembers | Boolean | True to show members of the queue. | |
| items[].showStats | Boolean | True to show mini queue stats for the day. | |
| items[].maxCalls | Number | Max number of calls to show before scrolling. | |
| items[].maxMembers | Number | Max number of members to show before scrolling. | |
| items[].stats | Array | List of statistics properties to show: NOMEMBERS, ALLBUSY, TIMEOUT, CANCELLED, ANSWERED, UNANSWERED, TOTAL, AVERAGEWAITTIME, AVERAGETALKTIME, TOTALTALKTIME, LONGESTWAITTIME, LASTWAITTIME. | |
| When type is EXTENSIONS | |||
| items[].title | String | Title for the panel. | |
| items[].extensions | Array | Array of ids of extensions to list, in order. | |
| When type is WEB | |||
| items[].width | Number | Width in pixels. Column with resize to the widest web content in the column. | |
| items[].height | Number | Height in pixels. | |
| items[].title | String | Title for the panel. | |
| items[].mode | String | Mode: STATIC - static URL RELOADED - static URL that is auto-reloaded at an interval RINGING - URL is invoked and content shown when the phone rings ANSWERED - URL is invoked and content shown when the phone is answered |
|
| items[].interval | Number | When mode is RELOADED, this is the number of seconds between reloading the content. | |
| items[].url | String | URL to invoke, including query args that may contain %%A_NUMBER%%, %%B_NUMBER%%, %%A_NAME%%, %%B_NAME%%, %%VARIABLE%%. | |
| items[].close | String | Close method: NEVER - content is always shown ON_END - closes when call ends BUTTON - a close button is added to the headline. |
|
| items[].ignoreLocal | Boolean | If mode is RINGING or ANSWERED and this is true, then the content will not be triggered when caller is local. | |
| When type is SHORTCUTS | |||
| items[].title | String | Title for panel. | |
| items[].shortcuts[].name | String | Label for the shortcut. | |
| items[].shortcuts[].number | String | Number to call. | |
| When type is SWITCHVAR | |||
| items[].title | String | Name of content - for headline. | |
| items[].variables[].type | String | Type: SWITCH or VARIABLE | |
| items[].variables[].name | String | Switch or variable name. | |
| items[].variables[].owner | String | Ownership: PERSONAL, SHARED, SYSTEM (required MANAGER level or higher). | |
| items[].variables[].label | String | Label for the switch or variable. | |
| items[].variables[].values | Array | Optional list of string that can be selected from a dropdown list and assigned. Variable types only. | |
As little as a single property can be provided, but arrays but be submitted in full.
Query examples
{ "name": "Standard", "group": null, "topbar": 0, "items": [ { "column": 0, "position": 0, "type": "MYCALLS", "variable": "ZIP", "variableName": "ZIP code" }, { "column": 0, "position": 1, "type": "QUEUE", "_id": ObjectId("12345678901234567890CCCC"), "variable": "CPR", "variableName": "CPR nummer", "showCalls": true, "showMembers": true, "showStats": true, "maxCalls": 10, "maxMembers": 5, "stats": [ "UNANSWERED", "ANSWERED", "AVERAGEWAITTIME", "LASTWAITTIME" ] }, { "column": 1, "position": 0, "type": "EXTENSIONS", "title": "København", "extensions": [ ObjectId("12345678901234567890DDDD"), ObjectId("12345678901234567890EEEE"), ObjectId("12345678901234567890FFFF") ] }, { "column": 1, "position": 1, "type": "WEB", "width": 400, "height": 300, "title": "Kunde data", "mode": "RINGING", "interval": null, "url": "https://our-cms-system.com/lookup?number=%%A_NUMBER%%", "close": "BUTTON", "ignoreLocal": false }, { "column": 2, "position": 0, "type": "SHORTCUTS", "title": "Mine genveje", "list": [ { "name": "Taxi", "number": "+4580808080" }, { "name": "Pizza", "number": "+4566666666" } ] }, { "column": 2, "position": 1, "type": "SWITCHVAR", "title": "Indstillinger", "list": [ { "type": "SWITCH", "name": "NightModeEnabled", "owner": "GLOBAL", "label": "Nat-tilstand" }, { "type": "VARIABLE", "name": "ReceptionStatus", "owner": "SHARED", "label": "Receptionen er", "values": [ "åben", "til frokost", "straks tilbage", "lukket" ] } ] } ] }
Response
The updated dashboard.
| JSON object | ||
|---|---|---|
| _id | Id | Unique Id of the item. |
| customer | Id | Id of customer. |
| employee | Id | Id of employee the dashboard belongs to, null is dashboard is shared. |
| group | Id | Optional id of a PBX group, the employees extension must be a member of to view this dashboard. Null when not shared. |
| shared | Boolean | True if dashboard is shared. |
| name | String | Name of the dashboard. |
| topbar | Number | Priority in the topbar, 0=do not display in topbar, 1-5 positional priority |
| items | Array | List of items on the dashboard. |
| items[].column | Number | 0-based index of column the item belongs to. |
| items[].position | Number | 0-based index of the position of the item in the column. |
| items[].type | String | Type of item: MYCALLS, QUEUE, MULTIQUEUE, EXTENSIONS, WEB, SWITCHVAR, SHORTCUTS. |
| When type is MYCALLS | ||
| items[].maxCalls | Number | Max number of calls to show before scrolling. |
| items[].variable | String | Optional name of variable to show with the call data. |
| items[].variableName | String | Optional label to prefix the variable with. |
| When type is QUEUE | ||
| items[]._id | Id | Id of queue to show. |
| items[].variable | String | Optional name of variable to show with the call data. |
| items[].variableName | String | Optional label to prefix the variable with. |
| items[].showCalls | Boolean | True to show calls waiting in the queue. |
| items[].showMembers | Boolean | True to show members of the queue. |
| items[].showStats | Boolean | True to show mini queue stats for the day. |
| items[].maxCalls | Number | Max number of calls to show before scrolling. |
| items[].maxMembers | Number | Max number of members to show before scrolling. |
| items[].stats | Array | List of statistics properties to show: NOMEMBERS, ALLBUSY, TIMEOUT, CANCELLED, ANSWERED, UNANSWERED, TOTAL, AVERAGEWAITTIME, AVERAGETALKTIME, TOTALTALKTIME, LONGESTWAITTIME, LASTWAITTIME. |
| When type is MULTIQUEUE | ||
| items[]._ids | Array | Ids of queues to show. |
| items[].variable | String | Optional name of variable to show with the call data. |
| items[].variableName | String | Optional label to prefix the variable with. |
| items[].showCalls | Boolean | True to show calls waiting in the queue. |
| items[].showMembers | Boolean | True to show members of the queue. |
| items[].showStats | Boolean | True to show mini queue stats for the day. |
| items[].maxCalls | Number | Max number of calls to show before scrolling. |
| items[].maxMembers | Number | Max number of members to show before scrolling. |
| items[].stats | Array | List of statistics properties to show: NOMEMBERS, ALLBUSY, TIMEOUT, CANCELLED, ANSWERED, UNANSWERED, TOTAL, AVERAGEWAITTIME, AVERAGETALKTIME, TOTALTALKTIME, LONGESTWAITTIME, LASTWAITTIME. |
| When type is EXTENSIONS | ||
| items[].title | String | Title for the panel. |
| items[].extensions | Array | Array of ids of extensions to list, in order. |
| When type is WEB | ||
| items[].width | Number | Width in pixels. Column with resize to the widest web content in the column. |
| items[].height | Number | Height in pixels. |
| items[].title | String | Title for the panel. |
| items[].mode | String | Mode: STATIC - static URL RELOADED - static URL that is auto-reloaded at an interval RINGING - URL is invoked and content shown when the phone rings ANSWERED - URL is invoked and content shown when the phone is answered |
| items[].interval | Number | When mode is RELOADED, this is the number of seconds between reloading the content. |
| items[].url | String | URL to invoke, including query args that may contain %%A_NUMBER%%, %%B_NUMBER%%, %%A_NAME%%, %%B_NAME%%, %%VARIABLE%%. |
| items[].close | String | Close method: NEVER - content is always shown ON_END - closes when call ends BUTTON - a close button is added to the headline. |
| items[].ignoreLocal | Boolean | If mode is RINGING or ANSWERED and this is true, then the content will not be triggered when caller is local. |
| When type is SHORTCUTS | ||
| items[].title | String | Title for panel. |
| items[].shortcuts[].name | String | Label for the shortcut. |
| items[].shortcuts[].number | String | Number to call. |
| When type is SWITCHVAR | ||
| items[].title | String | Name of content - for headline. |
| items[].variables[].type | String | Type: SWITCH or VARIABLE |
| items[].variables[].name | String | Switch or variable name. |
| items[].variables[].label | String | Label for the switch or variable. |
| items[].variables[].values | Array | Optional list of string that can be selected from a dropdown list and assigned. Variable types only. |
Note that properties holding no value may be omitted from the object.
Example
{ "_id": "12345678901234567890ABCD", "customer": "12345678901234567890AAAA", "employee": "12345678901234567890BBBB", "shared": false, "group": null, "name": "Standard", "topbar": 0, "items": [ { "column": 0, "position": 0, "type": "MYCALLS", "variable": "ZIP", "variableName": "ZIP code" }, { "column": 0, "position": 1, "type": "QUEUE", "_id": ObjectId("12345678901234567890CCCC"), "variable": "CPR", "variableName": "CPR nummer", "showCalls": true, "showMembers": true, "showStats": true, "maxCalls": 10, "maxMembers": 5, "stats": [ "UNANSWERED", "ANSWERED", "AVERAGEWAITTIME", "LASTWAITTIME" ] }, { "column": 1, "position": 0, "type": "EXTENSIONS", "title": "København", "extensions": [ "12345678901234567890DDDD", "12345678901234567890EEEE", "12345678901234567890FFFF" ] }, { "column": 1, "position": 1, "type": "WEB", "width": 400, "height": 300, "title": "Kunde data", "mode": "RINGING", "interval": null, "url": "https://our-cms-system.com/lookup?number=%%A_NUMBER%%", "close": "BUTTON", "ignoreLocal": false }, { "column": 2, "position": 0, "type": "SHORTCUTS", "title": "Mine genveje", "list": [ { "name": "Taxi", "number": "+4580808080" }, { "name": "Pizza", "number": "+4566666666" } ] }, { "column": 2, "position": 1, "type": "SWITCHVAR", "title": "Indstillinger", "list": [ { "type": "SWITCH", "name": "NightModeEnabled", "label": "Nat-tilstand" }, { "type": "VARIABLE", "name": "ReceptionStatus", "label": "Receptionen er", "values": [ "åben", "til frokost", "straks tilbage", "lukket" ] } ] } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | _id | Dashboard not found |
| 403 | access_denied | Insufficient access level |
| 404 | group | Group not found |
| 404 | items[x]._id | Queue not found |
| 404 | items[x].extensions | One or more employees or extensions were not found |
| 409 | items[x].variables | Your access level does not permit GLOBAL ownership |
| 500 | internal_error | <Unspecified> |
api/pbx/app/dashboards/update.txt · Last modified: 2025/11/17 10:39 by Per Møller