sg dashboards

Overview

Provides information from instances of the role sg.

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 role instances sg

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

Obtaining the number of registered users by role instances sg

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/sg/dashboards HTTP/1.1

Response

Returns a list of sg 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/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 role instances sg

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

Request

URL may contain scope-parameters.

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

Response

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

Table 2. Object fields
Field Description

site

Site Name.

srvidx

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

node

The name of this node is.

online

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

addr

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

load

An object representing the number of processed SIP requests of the main types.

Object fields:

  • count_all_req – information on the number of all requests.

  • count_invite – information on the number of requests INVITE.

  • count_notify – information on the number of requests NOTIFY.

  • count_register – information on the number of requests REGISTER.

  • count_subscribe – information on the number of requests SUBSCRIBE.

The value of each of the listed fields contains the number of queries processed in the last second (seq1) and in the last 20 seconds (seq20).

Specified for available nodes.

Response example
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 the sg role instances included in the request scope specified by scope-parameters in the URL.

The instance of the sg role that served the REGISTER request is in the service route for other requests coming from both the SIP device and the SIP device.

Request

URL may contain scope-parameters.

Request example
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. Structure of the result object
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

A list of nodes in this site where an instance of the sg role is executed. Each node is represented as an object.

gate

srvidx

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

gate

node

The name of this node is.

gate

ports

A 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 role instance sg.

port

domains

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

domain

domain

Domain Name.

domain

regs

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

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

One account can have multiple registrations.

Response example
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": []
        }
      ]
    }
  ]
}

Obtaining the number of registered users by role instances sg

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

The instance of the sg role that served the REGISTER request is in the service route for other requests coming from both the SIP device and the SIP device.

Request

URL may contain scope-parameters.

Request example
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. Structure of the result object
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

A list of nodes in this site where an instance of the sg role is executed. Each node is represented as an object.

gate

srvidx

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

gate

node

The name of this node is.

gate

ports

A 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 role instance sg.

port

regcount

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

One account can have multiple registrations.

Response example
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": []
        }
      ]
    }
  ]
}