sg dashboards

Overview

Provides information from instances of the sg role.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/master/logicalroles/sg/dashboards

Getting the list of available dashboards

GET

/rest/v1/master/logicalroles/sg/dashboards/info

Getting information about sg role instances

GET

/rest/v1/master/logicalroles/sg/dashboards/sipusers

Getting information about registered users by sg role instances and domains

GET

/rest/v1/master/logicalroles/sg/dashboards/regcount

Getting the number of registered users by sg role instances

Common request scope parameters

The parameters below are used in the URL (?param=value) to limit the request application scope (the set of role instances to which the request applies). All are optional and may be absent. It makes sense to specify no more than one of them, or none at all.

Table 1. Possible parameters
Name Type Description

site

str

Site name from the configuration.

For example SITE8.

sites

array<str>

Comma-separated list of site names.

For example SITE1,SITE3.

server

str

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

For example 192.168.0.12 or 372.

servers

array<str>

Comma-separated list of server aliases.

For example 192.168.0.12,372,server05.


Getting the list of available dashboards

Request

Example request
GET /rest/v1/master/logicalroles/sg/dashboards HTTP/1.1

Response

Returns the list of sg role dashboards and relative URLs for obtaining them.

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

[
  {
    "name": "info",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/sg/dashboards/info",
        "params": []
      }
    }
  },
  {
    "name": "sipusers",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/sg/dashboards/sipusers",
        "params": []
      }
    }
  },
  {
    "name": "regcount",
    "_links": {
      "self": {
        "href": "/rest/v1/master/logicalroles/sg/dashboards/regcount",
        "params": []
      }
    }
  }
]

Getting information about sg role instances

Provides information about all instances of the sg role within the request scope specified by URL scope parameters.

Request

The URL may contain scope parameters.

Example request
GET /rest/v1/master/logicalroles/sg/dashboards/info HTTP/1.1

Response

Returns a list of objects representing servers/nodes, each containing an sg role instance.

Table 2. Object fields
Field Description

site

Site name.

srvidx

Numeric identifier of this node (roleid from the configuration).

node

Name of this node.

online

Availability flag of this node from the web server executing the API request.

addr

IP address of the esg role on this node. Specified only if the node is available.

load

Object representing the number of processed SIP requests of the main types.

Object fields:

  • count_all_req – information about the number of all requests.

  • count_invite – information about the number of INVITE requests.

  • count_notify – information about the number of NOTIFY requests.

  • count_register – information about the number of REGISTER requests.

  • count_subscribe – information about the number of SUBSCRIBE requests.

Each of these field values contains the number of processed requests over the last second (seq1) and over the last 20 seconds (seq20).

Specified for available nodes.

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

[
  {
    "site": "SITE1",
    "srvidx": 7,
    "node": "site1_h7@192.168.0.10",
    "addr": "192.168.0.10",
    "online": true,
    "load": {
      "count_all_req": {
        "sec1": 0,
        "sec20": 12
      },
      "count_invite": {
        "sec1": 0,
        "sec20": 0
      },
      "count_notify": {
        "sec1": 0,
        "sec20": 4
      },
      "count_register": {
        "sec1": 0,
        "sec20": 3
      },
      "count_subscribe": {
        "sec1": 0,
        "sec20": 4
      }
    }
  },
  {
    "site": "SITE1",
    "srvidx": 4,
    "node": "site1_h4@192.168.0.10",
    "addr": "192.168.0.10",
    "online": true,
    "load": {
      "count_all_req": {
        "sec1": 1,
        "sec20": 0
      },
      "count_invite": {
        "sec1": 0,
        "sec20": 0
      },
      "count_notify": {
        "sec1": 0,
        "sec20": 0
      },
      "count_register": {
        "sec1": 1,
        "sec20": 0
      },
      "count_subscribe": {
        "sec1": 0,
        "sec20": 0
      }
    }
  },
  {
    "site": "SITE2",
    "srvidx": 104,
    "node": "site2_h4@192.168.0.10",
    "addr": "192.168.0.10",
    "online": false
  }
]

Getting information about registered users by sg role instances and domains

Returns information about the composition of registered SIP user accounts. Information is returned from sg role instances within the request scope specified by URL scope parameters.

The sg role instance that served the REGISTER request ends up in the servicing route of other requests coming both from the SIP device and to the SIP device.

Request

The URL may contain scope parameters.

Example request
GET /rest/v1/master/master/logicalroles/sg/dashboards/sipusers?site=SITE1 HTTP/1.1

Response

Returns an object with information about the composition of sites, servers, domains, and SIP user accounts registered through them.

Table 3. Result object structure
Level Field Description

root

sites

List of sites containing esg role instances according to the configuration. Each site is represented as an object.

site

site

Site name.

site

gates

List of nodes on this site running an sg role instance. Each node is represented as an object.

gate

srvidx

Numeric identifier of this node (roleid from the configuration).

gate

node

Name of this node.

gate

ports

List of ports of the sg role instance running on this node. Each port is represented as an object.

port

port

Local port of the sg role instance.

port

domains

List of domains with registrations on this port/node/site. Each domain is represented as an object.

domain

domain

Domain name.

domain

regs

List of registrations of SIP user accounts of this domain served on this port/node/site.

Each value in the list has the contact URI format: proto:username@device_address:device_port.

One account can have several registrations.

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

{
  "sites": [
    {
      "site": "SITE1",
      "gates": [
        {
          "srvidx": 4,
          "node": "site1_h4@192.168.0.10",
          "ports": [
            {
              "port": 5060,
              "domains": [
                {
                  "domain": "test.rootdomain.ru",
                  "regs": [
                    "udp:sip3@192.168.0.203:5062",
                    "udp:sip6@192.168.0.200:5060"
                  ]
                }
              ]
            }
          ]
        },
        {
          "srvidx": 7,
          "node": "site1_h7@192.168.0.10",
          "ports": []
        }
      ]
    }
  ]
}

Getting the number of registered users by sg role instances

Returns information about the number of registered SIP user accounts. Information is returned from sg role instances within the request scope specified by URL scope parameters.

The sg role instance that served the REGISTER request ends up in the servicing route of other requests coming both from the SIP device and to the SIP device.

Request

The URL may contain scope parameters.

Example request
GET /rest/v1/master/logicalroles/sg/dashboards/regcount HTTP/1.1

Response

Returns an object with information about the composition of sites, servers, and the number of SIP user accounts registered through them.

Table 4. Result object structure
Level Field Description

root

sites

List of sites containing esg role instances according to the configuration. Each site is represented as an object.

site

site

Site name.

site

gates

List of nodes on this site running an sg role instance. Each node is represented as an object.

gate

srvidx

Numeric identifier of this node (roleid from the configuration).

gate

node

Name of this node.

gate

ports

List of ports of the sg role instance running on this node. Each port is represented as an object.

port

port

Local port of the sg role instance.

port

regcount

Number of registrations of SIP user accounts served on this port/node/site.

One account can have several registrations.

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

{
  "sites": [
    {
      "site": "SITE1",
      "gates": [
        {
          "srvidx": 4,
          "node": "site1_h4@192.168.0.10",
          "ports": [
            {
              "port": 5060,
              "regcount": 2
            }
          ]
        },
        {
          "srvidx": 7,
          "node": "site1_h7@192.168.0.10",
          "ports": []
        }
      ]
    },
    {
      "site": "SITE2",
      "gates": [
        {
          "srvidx": 104,
          "node": "site2_h4@192.168.0.10",
          "ports": []
        }
      ]
    }
  ]
}