User Tools

Site Tools


api:pbx:app:dashboards:get

API : PBX : APP : Dashboard Get

Introduction

This request will create a new 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 of the customer
RESELLER if dashboard belongs to a customers employee
ADMIN.
Params DASH_ID ID Id of the dashboard to return.

Query examples

https://api.telecomx.dk/pbx/app/dashboard/12345678901234567890ABCD

Response

JSON object
_id Id Unique Id of the item.
customer Id Id of customer.
employee Id [Optional] Id of employee the dashboard belongs to, null if 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, 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
RINGING_OR_OUT - URL is invoked and content shown when the phone rings or an outbound call is made
ANSWERED_OR_OUT - URL is invoked and content shown when the phone is answered or an outbound call 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.

Note that properties holding no value may be omitted from the object.

Example

{
  "_id": "12345678901234567890ABCD",
  "customer": "12345678901234567890AAAA",
  "employee": "12345678901234567890BBBB",
  "group": null,
  "shared": false,
  "name": "Standard",
  "topbar": 0,
  "items": [
    {
      "column": 0,
      "position": 0,
      "type": "MYCALLS"
      "variable": "ZIP",
      "variableName": "ZIP code" 
    },
    {
      "column": 0,
      "position": 1,
      "type": "QUEUE",
      "_id": "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",
          "owner": "GLOBAL",
          "label": "Nat-tilstand"
        },
        {
          "type": "VARIABLE",
          "name": "ReceptionStatus",
          "OWNER": "SHARED",
          "label": "Receptionen er",
          "values": [ "åben", "til frokost", "straks tilbage", "lukket" ]
        }
      ]
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/app/dashboards/get.txt · Last modified: 2025/11/17 10:36 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki