esg dashboards

Overview

Provides information from instances of the role esg.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/master/logicalroles/esg/dashboards

Getting the list of available dashboards

GET

/rest/v1/master/logicalroles/esg/dashboards/info

Obtaining complete information on roles esg

GET

/rest/v1/master/logicalroles/esg/dashboards/count

Obtaining summary quantitative indicators from roles esg

GET

/rest/v1/master/logicalroles/esg/dashboards/sites

Obtaining summary quantitative indicators from esg roles by site

General scoping parameters of requests

The given parameters are used in the URL (?param=value) to restrict the scoping of the request (the composition of role instances to which the request applies). All are optional and may not be available. It makes sense to specify no more than one of these, or to specify none.

Table 1. Possible parameters
Name Type Description

site

str

The site name from the configuration.

For example SITE8.

sites

array<str>

A comma-separated list of site names.

For example SITE1,SITE3.

server

str

Server alias. Can be the IP address, number or full name of the server from configuration.

For example 192.168.0.12 or 372.

servers

array<str>

A comma-separated list of server aliases.

For example 192.168.0.12,372,server05.


Getting the list of available dashboards

Request

Request example
GET /rest/v1/master/logicalroles/esg/dashboards HTTP/1.1

Response

Returns a list of esg role dashboards and the relative URLs to retrieve them.

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "name": "info",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/info",
        "params": []
      }
    }
  },
  {
    "name": "count",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/count",
        "params": []
      }
    }
  },
  {
    "name": "sites",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/esg/dashboards/sites",
        "params": []
      }
    }
  }
]

Obtaining complete information on roles esg

Provides information about all instances of role esg included in the request scope specified by scope-parameters in the URL.

Request

URL may contain additional scope-parameters.

Table 2. Request parameters
Name Type Description

regs

bool

Show active provider accounts and their enrollment statuses.

code

str

Provider Code. Used in conjunction with regs. Restricts the issuance of accounts. Provides information only about the provider account with the specified code.

Request example
GET /rest/v1/master/logicalroles/esg/dashboards/info HTTP/1.1

Response

Returns an object with information about the composition of sites, each containing a composition of servers/nodes, each containing an instance of the role esg.

Table 3. Structure of the result object
Level Field Description

root

dlgcount

The number of dialogs served by all esg role instances included in the request scope.

root

callcount

The number of dialog shoulders served by the esg role instances included in the request scope.

root

sites

List of sites that contain role instances according to the configuration esg.

site

site

Site Name.

site

dlgcount

The number of dialogs served by the esg role instances included in the query scope at this site.

site

callcount

The number of dialog shoulders served by the esg role instances included in the request scope at this site.

server

srvidx

The numeric identifier of this node (roleid from the configuration).

server

node

The name of this node is.

server

online

An indication that this node is accessible from the web server executing the API request.

server

addr

IP-address of the esg role in this node. It is specified only if the node is available.

server

dlgcount

The number of dialogs served by the esg role instance on this node. Specified for available nodes.

server

callcount

The number of dialog shoulders served by the esg role instance on this node. Specified for available nodes.

server

regs

List of accounts served by the esg role instance on this node. Applies to the reg=true query parameter. Specified for available nodes.

reg

code

Provider account code.

reg

d

The internal domain of the cluster to which this ISP account belongs.

reg

user

Username of the provider’s account.

reg

domain

Domain of the ISP account sent outward.

reg

port

The SIP server port to which the provider account connects.

reg

proto

The provider account protocol used. Possible values: "udp", "tcp", “tls”.

reg

addrs

List of addresses of the SIP server(s) to which the provider account connects.

reg

regstate

reg

pingstate

reg

lastresponse

List of headers of the last SIP server response to the sent request REGISTER.

reg

onlinetrunkcount

The number of active trunks in use.

Table 4. Registration states (regstate)
Condition Description

disabled

The account works without registration.

registered

The account is registered.

wait_result

The account is in the process of being registered.

retry

The account is pending the next registration attempt.

detached

The account is in the process of shutting down.

Table 5. Connection states (pingstate)
Condition Description

disabled

The account works without connection verification.

ok

The last connection check has been successfully completed.

error

The last connectivity test failed.

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "callcount": 0,
  "dlgcount": 0,
  "sites": [
    {
      "site": "SITE1",
      "callcount": 0,
      "dlgcount": 0,
      "servers": [
        {
          "srvidx": 1,
          "node": "site1_h1@192.168.0.12",
          "addr": "192.168.0.12",
          "online": true,
          "callcount": 0,
          "dlgcount": 0,
          "domains": [],
          "regs": [
            {
              "code": "ceceron",
              "d": "test.rootdomain.ru",
              "user": "sip4",
              "domain": "test.ceceron.ru",
              "port": 5060,
              "proto": "udp",
              "addrs": [
                "test.ceceron.ru",
                "192.168.0.84"
              ],
              "regstate": "registered",
              "pingstate": "disabled",
              "last_response": [
                "SIP/2.0 200 OK",
                "Via: SIP/2.0/UDP 192.168.0.12:5080;rport=5080;received=192.168.0.12;branch=z9hG4bK4d9MzT-4TRPTu",
                "From: <sip:sip4@test.ceceron.ru>;tag=4WUgbJ",
                "To: <sip:sip4@test.ceceron.ru>;tag=rB2-00A-TTsq",
                "Call-ID: avLICRwnMr6mjNV7HkWwcKX6RJ0",
                "CSeq: 199253986 REGISTER",
                "Max-Forwards: 70",
                "Content-Length: 0",
                "Contact: <sip:sip4@192.168.0.12:5080>;expires=120",
                "Contact: <sip:sip4@192.168.0.204:5062>;expires=313",
                "Supported: path",
                "Allow: REGISTER,INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,OPTIONS,INFO,SUBSCRIBE,MESSAGE,UPDATE",
                "Date: Tue, 05 Nov 2019 11:41:09 GMT",
                "Path: <sip:r_Q37WFY3@192.168.0.84:5060;transport=tcp;lr>"
              ],
              "onlinetrunkcount": 0
            },
            {
              "code": "rtest",
              "d": "test.rootdomain.ru",
              "user": "sip8",
              "domain": "test.rootdomain.ru",
              "port": 5060,
              "proto": "tcp",
              "addrs": [
                "test.rootdomain.ru",
                "192.168.0.12"
              ],
              "regstate": "registered",
              "pingstate": "ok",
              "last_response": [
                "SIP/2.0 200 OK",
                "Via: SIP/2.0/TCP 192.168.0.12:5080;rport=4005;received=192.168.0.12;branch=z9hG4bK3aut66-2ymB9o",
                "From: <sip:sip8@test.rootdomain.ru>;tag=FtT6WP",
                "To: <sip:sip8@test.rootdomain.ru>;tag=rB2-002-Qj4c",
                "Call-ID: 5DSlqsHIBWDPKaesn2JKzTjhRXA",
                "CSeq: 199349124 REGISTER",
                "Max-Forwards: 70",
                "Content-Length: 0",
                "Contact: <sip:sip8@192.168.0.12:5080;transport=TCP>;expires=34",
                "Supported: path",
                "Allow: REGISTER,INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,OPTIONS,INFO,SUBSCRIBE,MESSAGE,UPDATE",
                "Date: Tue, 05 Nov 2019 11:42:08 GMT",
                "Path: <sip:r_Q1CJaRf@192.168.0.12:5060;transport=tcp;lr>"
                ],
              "onlinetrunkcount": 0
            }
          ]
        },
        {
          "srvidx": 32,
          "node": "site1_h11@192.168.0.12",
          "online": false
        }
      ]
    },
    {
      "site": "SITE2",
      "callcount": 0,
      "dlgcount": 0,
      "servers": [
        {
          "srvidx": 101,
          "node": "site2_h1@192.168.0.12",
          "online": false
        }
      ]
    }
  ]
}

Obtaining summary quantitative indicators from roles esg

Provides information about the total number of dialogs and dialog shoulders from all instances of role esg included in the request scope specified by scope-parameters in the URL.

Returns a limited set of data from the query Obtaining complete information on roles esg.

Request

URL may contain additional scope-parameters.

Request example
GET /rest/v1/master/master/logicalroles/esg/dashboards/count HTTP/1.1

Response

Table 6. Structure of the result object
Field Description

dlgcount

The number of dialogs served by all esg role instances included in the request scope.

callcount

The number of dialog shoulders served by the esg role instances included in the request scope.

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "callcount": 24,
  "dlgcount": 12
}

Obtaining summary quantitative indicators from esg roles by site

Provides information about the total number of dialogs and dialog shoulders from all instances of role esg included in the request scope specified by scope-parameters in the URL. Returns data broken down by site and totals.

Returns a limited set of data from the query Obtaining complete information on roles esg.

Request

URL may contain additional scope-parameters.

Request

Request example
GET /rest/v1/master/logicalroles/esg/dashboards/sites HTTP/1.1

Response

Table 7. Structure of the result object
Level Field Description

root

dlgcount

The number of dialogs served by all esg role instances included in the request scope.

root

callcount

The number of dialog shoulders served by the esg role instances included in the request scope.

root

sites

List of sites that contain role instances according to the configuration esg.

site

site

Site Name.

site

dlgcount

The number of dialogs served by the esg role instances included in the query scope at this site.

site

callcount

The number of dialog shoulders served by the esg role instances included in the request scope at this site.

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "dlgcount": 24,
  "callcount": 12,
  "sites": [
    {
      "site": "SITE3",
      "callcount": 2,
      "dlgcount": 1
    },
    {
      "site": "SITE2",
      "callcount": 6,
      "dlgcount": 3
    },
    {
      "site": "SITE1",
      "callcount": 16,
      "dlgcount": 8
    }
  ]
}

See also