REST APIs to configure the Telco Network Cloud Manager - Performance system

If you want to configure the system with REST APIs instead of the configuration UI pages, use this information. You can run the curl commands to configure in bulk for all the actions on a page.

Note: When you change any of these configuration settings, the Audit trail configuration page is also updated to reflect the changes,

Alarm rules

For more information about configuring Alarm rules from UI, see Managing Alarm rules.

List all Alarm rules
curl -k --cookie mycookie https://<hostname>:<port>/threshold/rest/alarm/rule/list
Create Alarm rules from a JSON file
curl -k --cookie mycookie -X POST -H "Content-Type: application/json" -d @sampleAR.json -k https://<hostname>:<port>/threshold/rest/alarm/rule/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleAR.json 
{ 
"name": "restAR1", 
"enabled": true, 
"target_group": "", 
"category": 1, 
"target": "omniTarg" 
} 
Field Description
name Alarm rule name
enabled Enable or disable the alarm.
target_group Target group name
target Target name
Update alarm rules
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleAR.json -k https://<hostname>:<port>/threshold/rest/alarm/rule/update
Delete Alarm rules
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleAR.json -k https://<hostname>:<port>/threshold/rest/alarm/rule/delete
Import Alarm rules
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleAR.json -k https://<hostname>:<port>/threshold/rest/alarm/rule/import
Enable or disable Alarm rules
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleAR.json -k https://<hostname>:<port>/threshold/rest/alarm/rule/update

Time schedules

For more information about configuring Time schedules from UI, see Managing time schedules.

List all-Time schedules
curl -k --cookie mycookie https://<hostname>:<port>/threshold/rest/alarm/schedule/list 
Create Time schedules
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleAS.json -k https://<hostname>:<port>/threshold/rest/alarm/schedule/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleAS.json 
  {
    "name": "testTS",
    "time_period": [
      {
        "from": 28800000,
        "to": 32400000
      }
    ],
    "rank_of_week": 0,
    "enabled": true,
    "tz": "GMT",
    "rank_of_week_day": 0,
    "day_of_month": 0,
    "end": "26/02/2024 06:40 PM",
    "frequency": 0,
    "every_day": 1,
    "start": "25/02/2024 06:40 PM",
    "day": 0,
    "day_of_month_type": 0,
    "month": 0
  }
]
Field Description
name Schedule name
time_period Specific start and end time period in hours, minutes
rank_of_week  
enabled  
rank_of_week_day  
day_of_month  
end  
frequency Frequency can be daily, weekly, or monthly.
every_day  
start  
day  
day_of_month_type  
month  
Update Time schedules
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleAS.json -k https://<hostname>:<port>/threshold/rest/alarm/schedule/update
Delete Time schedules
curl -k --cookie myusercookie.txt  -X DELETE -H "Content-Type: application/json" -d @sampleAS.json -k https://<hostname>:<port>/threshold/rest/alarm/schedule/delete
Import Time schedules
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleAS.json -k https://<hostname>:<port>/threshold/rest/alarm/schedule/import

Alarm target

For more information about configuring Alarm target from UI, see Managing Alarm rules.

List all Alarm targets
curl -k --cookie mycookie https://<hostname>:<port>/threshold/rest/alarm/target/list 
Create Alarm targets
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleAT.json -k https://<hostname>:<port>/threshold/rest/alarm/target/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleAT.json 
[
{
    "emailCC": "",
    "program": "",
    "name": "restAT_targ_insert",
    "emailBCC": "",
    "snmpPort": 161,
    "kafkaBrokerList": "restabc:6667",
    "snmpAuthentication": "",
    "snmpEncryptionPassword": "",
    "snmpCommunity": "",
    "emailTo": "",
    "snmpContext": "",
    "kafkaTopic": "restmyTopic",
    "snmpVersion": 2,
    "snmpHost": "",
    "snmpAuthenticationPassword": "",
    "snmpLevel": "noAuthNoPriv",
    "snmpUsername": "",
    "snmpEncryption": "",
    "targetType": 5
  },
  {
    "emailCC": "",
    "program": "",
    "name": "rest1AT_targ_insert",
    "emailBCC": "",
    "snmpPort": 161,
    "kafkaBrokerList": "rest1abc:6667",
    "snmpAuthentication": "",
    "snmpEncryptionPassword": "",
    "snmpCommunity": "",
    "emailTo": "",
    "snmpContext": "",
    "kafkaTopic": "rest1myTopic",
    "snmpVersion": 2,
    "snmpHost": "",
    "snmpAuthenticationPassword": "",
    "snmpLevel": "noAuthNoPriv",
    "snmpUsername": "",
    "snmpEncryption": "",
    "targetType": 5
  }
  ]
Field Description
emailCC Email address on CC
program  
name Name of the Alarm target
emailBCC Email address on Bcc
snmpPort SNMP port. By default, it is 161.
kafkaBrokerList
List of Kafka broker hosts. For example,
<kafka_broker_host>:<kafka_broker_
port>
snmpAuthentication SNMP version
  • v2c
  • v3
snmpLevel
It is applicable for SNMP V3 version only. It has these options.
  • noAuthNoPriv
  • authNoPriv
  • authPriv
snmpUsername Username of the SNMP-enabled device
snmpEncryption Encryption on the SNMP-enabled device
targetType  
Update Alarm targets
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleAT.json -k https://<hostname>:<port>/threshold/rest/alarm/target/update
Delete Alarm target
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleAT.json -k https://<hostname>:<port>/threshold/rest/alarm/target/delete
Import Alarm targets
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleAT.json -k https://<hostname>:<port>/threshold/rest/alarm/target/import

Alarm target groups

For more information about configuring Alarm target groups from UI, see Managing Alarm rules.

List all Alarm target groups
curl -k --cookie mycookie https://<hostname>:<port>/threshold/rest/alarm/target/group/list 
Create Alarm target groups
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleATG.json -k https://<hostname>:<port>/threshold/rest/alarm/target/group/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleATG.json 
{
    "name": "resttg2Delete",
    "targets": [
      "omniTarg"
    ]
}
Field Description
name Target name
targets Target types
  • OMNIbus
  • Kafka
  • SNMP Trap
Update Alarm target groups
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleATG.json -k https://<hostname>:<port>/threshold/rest/alarm/target/group/update
Delete Alarm target groups
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleATG.json -k https://<hostname>:<port>/threshold/rest/alarm/target/group/delete
Import Alarm target groups
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleATG.json -k https://<hostname>:<port>/threshold/rest/alarm/target/group/import

Autonomous systems

For more information about configuring Autonomous systems from UI, see Managing Autonomous systems.

List all Autonomous systems
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/as/list 
Create Autonomous systems
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleASys.json -k https://<hostname>:<port>/flow-collector/rest/as/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleASys.json 
[
{
  "ID": 11111888,
  "NAME": "restABC",
  "COUNTRY": "AL",
  "PUBLIC": true
},
{
  "ID": 11111889,
  "NAME": "restXYZ",
  "COUNTRY": "AL",
  "PUBLIC": false
}
]
Field Description
ID ID that that represents a unique ASN.
Note: Autonomous System numbers one to 64511 are available by IANA/ARIN (IANA/American Registry for Internet Numbers) for global use. The 64512 - 65535 series is reserved for private and reserved purposes.
NAME Name of the Autonomous System.
Note: Autonomous System numbers, one to 64511 contain predefined names for global use. The 64512 - 65535 series is reserved for private and reserved purposes.
COUNTRY Country to which the specific network routing domain belongs.
PUBLIC Flag that represents whether the network domain is a private use ASN or with in the public Autonomous System range.
Update Autonomous systems
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleASys.json -k https://<hostname>:<port>/flow-collector/rest/as/update
Delete Autonomous systems
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleASys.json -k https://<hostname>:<port>/flow-collector/rest/as/delete
Import Autonomous systems
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleASys.json -k https://<hostname>:<port>/flow-collector/rest/as/import

Domain names

For more information about configuring Domain names from UI, see Managing domain names.

List all Domain names
curl -k --cookie mycookie https://<hostname>:<port>/dns-collector/config/domain-name/list 
Create Domain names
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleDN.json -k https://<hostname>:<port>/dns-collector/config/domain-name/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleDN.json 
{
    "domainName": "test.co.in",
    "resolved": 1622021120000
  }
Field Description
domainName Name of the domain
resolved Timestamp when the domain name is resolved by the DNS server.
Update Domain names
curl -k --cookie myusercookie.txt  -X POST -H "Content-Type: application/json" -d @sampleDN.json -k https://<hostname>:<port>/dns-collector/config/domain-name/update
Delete Domain names
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleDN.json -k https://<hostname>:<port>/dns-collector/config/domain-name/delete
Import Domain names
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleDN.json -k https://<hostname>:<port>/dns-collector/config/domain-name/import

Flow aggregations

For more information about configuring Flow aggregations from UI, see Managing Flow aggregations.

List all Flow aggregations
curl -k --cookie mycookie https://<hostname>:<port>/flow-analytics/rest/aggregation/list
Update Flow aggregations
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleFA.json -k https://<hostname>:<port>/flow-analytics/rest/aggregation/update
Sample reference of input file for POST request.
$ cat sampleFA.json
 {
    "AGGREGATION": "srcipgroup_tos",
    "AGG_FIELDS": "SRC_IP_GROUP, SRC_TOS",
    "VISIBLE": true,
    "ENABLED": false
  }
Field Description
AGGREGATION Name of the aggregation
AGG_FIELDS Fields that are associated with the aggregation.
VISIBLE Ignore this field.
ENABLED Flag to represent whether the aggregation is enabled or disabled.

Flow Interface

Flow collector service provide rest interface to list and controlled NetFlow data collection for interfaces.
List Flow interfaces
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/interface/list
Sample reference of input file for POST request.
[
   {
      "entityId":8589934652,
      "ifIndex":1,
      "remoteContext":"",
      "interfaceName":"T1 1/0_AY123_upd",
      "enabled":true,
      "interfaceDescription":"T1 1/1",
      "startMs":1656930875427,
      "direction":0,
      "key":"10.55.239.236_interface:<1>_ingress",
      "id":"10.55.239.236_interface:<1>",
      "exporterIp":"10.55.239.236",
      "speed":1000000
   },
   {
      "entityId":8589934653,
      "ifIndex":1,
      "remoteContext":"",
      "interfaceName":"T1 1/0_AY123_upd",
      "enabled":true,
      "interfaceDescription":"T1 1/1",
      "startMs":1656930875427,
      "direction":1,
      "key":"10.55.239.236_interface:<1>_egress",
      "id":"10.55.239.236_interface:<1>",
      "exporterIp":"10.55.239.236",
      "speed":1000000
   },
]
Enable NetFlow data collection for Flow interface
curl -k --cookie mycookie -X POST -H "Content-Type: application/json" -d @sampleInterface.json 
-k https://<hostname>:<port>/flow-collector/rest/interface/enable
Sample reference of input file for POST request.
{
      "entityId":8589934652,
      "ifIndex":1,
      "remoteContext":"",
      "interfaceName":"T1 1/0_AY123_upd",
      "enabled":false,
      "interfaceDescription":"T1 1/1",
      "startMs":1656930875427,
      "direction":0,
      "key":"10.55.239.236_interface:<1>_ingress",
      "id":"10.55.239.236_interface:<1>",
      "exporterIp":"10.55.239.236",
      "speed":1000000
   }
Field Description
entityId Entity ID of Flow interface. Unique ID that is assigned by the Flow collector when it discovers on arrival of Flow data.
ifIndex Interface index
remoteContext Remote Context from which interface discovered.
interfaceName Interface Name
enabled Field use by flow collector to controlled netflow data collection for interface
interfaceDescription  
startMs  
direction Integer representing direction of interface INGRESS/0 or EGRESS/1
key Key to identify interface with direction
id

Unique identifier for interface in inventory

It flow convention <remote context>/<exporter ip>_interface:<ifIndex>
exporterIp Netflow exporter id address
speed Speed of interface
Disable netflow data collection for flow interface

Flow collector will not collect and store data for interfaces those marked to disable.

curl -k --cookie mycookie -X POST -H "Content-Type: application/json" -d @sampleInterface.json 
-k https://<hostname>:<port>/flow-collector/rest/interface/disable
Sample reference of input file for POST request.
$cat sampletos.json
[{
      "entityId":8589934652,
      "ifIndex":1,
      "remoteContext":"",
      "interfaceName":"T1 1/0_AY123_upd",
      "enabled":true,
      "interfaceDescription":"T1 1/1",
      "startMs":1656930875427,
      "direction":0,
      "key":"10.55.239.236_interface:<1>_ingress",
      "id":"10.55.239.236_interface:<1>",
      "exporterIp":"10.55.239.236",
      "speed":1000000
   }]

Flow IP grouping

For more information about configuring IP grouping from UI, see Managing Flow IP Grouping.

List all IP Groups
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/ipgroup/list 
Create IP Groups
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleIP.json -k https://<hostname>:<port>/flow-collector/rest/ipgroup/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleIP.json 
{
    "IP_ADDRESS_ID": "b3aaec79-7774-4e89-9ed4-b4f63b3ebe18",
    "IP_ADDRESS_GROUP": "restIpGrp#%test_.-user",
    "ENABLED": true,
    "IP_ADDRESS_START": "11.11.21.100",
    "IP_ADDRESS_END": "11.11.21.150",
    "UPDATE_DATE": 1622024291
  }
Field Description
IP_ADDRESS_ID IP address group ID
IP_ADDRESS_GROUP Logical name to the group. Create your IP Grouping by location. For example, branch offices or departments for easier monitoring.
ENABLED A flag to enable or disable the specified IP address group.
IP_ADDRESS_START Start IP address for the range.
IP_ADDRESS_END End IP address for the range.
UPDATE_DATE Timestamp when the IP address group is created or updated.
Update IP groups
curl -k --cookie myusercookie.txt  -X POST -H "Content-Type: application/json" -d @sampleIP.json -k https://<hostname>:<port>/flow-collector/rest/ipgroup/update
Delete IP groups
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleIP.json -k https://<hostname>:<port>/flow-collector/rest/ipgroup/delete
Import IP groups
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleIP.json -k https://<hostname>:<port>/flow-collector/rest/ipgroup/import

Flow NBAR

For more information about configuring NBAR from UI, see Managing NBAR.

List all NBAR entries
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/nbar/list 
Update NBAR entries
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleNBAR.json -k https://<hostname>:<port>/flow-collector/rest/nbar/update
Sample reference of input file for POST request.
$ cat sampleNBAR.json 
{
    "ENGINE_ID": 13,
    "SELECTOR_ID": 631,
    "NAME": "ms-lync",
    "DESCRIPTION": "Skype for Businessupdated",
    "ENABLE_ART": false,
    "ENABLE_ART_SOURCE": 0,
    "CATEGORY_NAME": "business-and-productivity-tools",
    "SUBCATEGORY_NAME": "voice-video-chat-collaboration",
    "GROUP_NAME": "ms-lync-group",
    "P2P_TECHNOLOGY": "no",
    "TUNNEL_TECHNOLOGY": "no",
    "ENCRYPTED_TECHNOLOGY": "yes",
    "BUSINESS_RELEVANCE": "business-relevant"
  }
Field Description
ENGINE_ID A unique identifier for the engine that determined the Selector ID. The Engine ID is the first 8 bits that provide information about the engine that classifies the flow.
SELECTOR_ID The remaining 24 bits that provide information about the application.
Note: Engine ID and Selector ID constitute the Application ID.
NAME Name of the application that is derived from the Application ID.
DESCRIPTION Application description that can be derived from the Application option template.
ENABLE_ART Flag to enable or disable ART.
ENABLE_ART_SOURCE  
CATEGORY_NAME Provides the first-level categorization for each application.
SUBCATEGORY_NAME Provides the second-level categorization for each application.
GROUP_NAME Identifies the group application that belongs to the same networking application.
P2P_TECHNOLOGY Specifies whether an application is based on peer-to-peer technology.
TUNNEL_TECHNOLOGY Specifies whether an application tunnels the traffic of other protocols.
ENCRYPTED_TECHNOLOGY Specifies whether an application is an encrypted networking protocol.
BUSINESS_RELEVANCE Business relevance as business-relevant or default.

Flow Type of Service (ToS)

For more information about configuring ToS from UI, see Managing Type of Service.

List all ToS entries
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/tos/list
Update ToS entries
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampletos.json -k https://<hostname>:<port>/flow-collector/rest/tos/update
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampletos.json 
{
    "TOSID": 0,
    "TOSNAME": "Best Effortupd"
  }
Fields Description
TOSID This field implements the Type of Service on the NetFlow packet to tradeoff on delay, throughput, reliability, and cost.
TOSNAME You can specify any name to your Type of Service class. See Managing Type of Service.
Import ToS
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampletos.json -k https://<hostname>:<port>/flow-collector/rest/tos/list/import

Flow Retention profile

For more information about configuring Retention profile from UI, see Managing flow data retention profiles.

List Retention profiles
curl -k --cookie mycookie https://<hostname>:<port>/flow-collector/rest/retention/list
Update Retention profiles
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @samplerp.json -k https://<hostname>:<port>/flow-collector/rest/retention/update
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat samplerp.json 
{
    "ID": 5,
    "NAME": "DNS",
    "UNIT": 2,
    "PERIOD": 6
  }
Fields Description
ID ID of the profile
NAME Profile data name
UNIT Unit can be Days, Weeks, or Months.
PERIOD The period for which you want to retain the data.

Ping profiles

For more information about configuring ICMP Ping profiles from UI, see Managing ICMP Ping profiles.

List all Ping profiles
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/ping-collector/rest/icmp
Create Ping profiles
sudo curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat profile.json
[
    {
        "name": "Profile1",
        "ping_count": 1,
        "description": "test profile",
        "enabled": true,
        "groups": [
            "local_snmp_dev"
        ],
        "last_run": 1656411301027,
        "interval": 300,
        "status": "Pinged 7/8 in 1008 ms, skipped 1",
        "resources": [
            {
                "display_name": "10.212.7.248",
                "resource_id": "10.212.7.248",
                "resource_type": "device"
            },
            {
                "display_name": "10.212.7.248-Lo69",
                "resource_id": "10.212.7.248_interface:<69>",
                "resource_type": "interface"
            }
        ],
        "remote_context": "",
        "timeout": 1,
        "payload_size": 32
    }
]	
Field Description
payload_size Size of ICMP packets to be used for the ping request. Default is set to 32 bytes. (Min 32 bytes, Max 65507 bytes)
ping_count Number of ping attempts on target device before giving up.(Min 1, Max 10)
polling Interval (s) Number of ping requests that must be initiated.
timeout How long the polling process must wait for a response from the target device before sending a new ping packet. (Min 1s, Max 10s)
interval How frequently the ping request must be initiated. (Min 10, Max 43200)
name Ping profile name
description Ping profile name
enabled Ping profile enabled or disabled flag
remote_context Remote context name for ping profile if it is required to be executed from Remote Ping Collector.
last_run The last run date of the ping profile. If a profile is newly created and the ping is yet to run, this column displays the value Not run.
status tatus of last ping profile run. For example, Pinged 7/8 in 1008 ms, skipped 1.
resources Information on devices and interfaces that must be pinged.
groups Groups information that consists of devices and interfaces that msut be pinged.
Update Ping profiles
sudo curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/update
Delete Ping profiles
sudo curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/delete
Import Ping profiles
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/import
Count of existing Ping profiles
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/count
Enable Ping collector profiles
sudo curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/enable
Disable Ping collector profiles
sudo curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/ping-collector/rest/icmp/disable
Get inventory device information
sudo curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/ping-collector/rest/inventory/resources?type=device
Get inventory interface information
sudo curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/ping-collector/rest/inventory/resources?type=interface
Get inventory group information
sudo curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/ping-collector/rest/inventory/resources?type=ResourcesGroup

Threshold definitions

For more information about configuring Threshold definitions from UI, see Managing thresholds.

List all Threshold definitions
curl -k --cookie mycookie https://<hostname>:<port>/threshold/rest/threshold/list 
Create Threshold definitions
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleTD.json -k https://<hostname>:<port>/threshold/rest/threshold/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat sampleTh.json 
[
  {
    "name": "SampleTh",
    "creation_time": 1711348868638,
    "target_rule": "OmniRule",
    "tag": "",
    "user_groups": "Group1,Group2",
    "resource": [],
    "evaluations": [
      {
        "burst_major_lower_limit": 0,
        "burst_major_clear_time": 0,
        "burst_major_upper_limit": 0,
        "active_until": "11 Apr 2024, 12:09:00 GMT",
        "period_critical_lower_limit": 0,
        "period_critical_time": 0,
        "burst_critical_lower_limit": 10,
        "period_granularity": 1,
        "burst_warning_mode": 0,
        "burst_minor_occurrence": 0,
        "burst_critical_enabled": true,
        "burst_critical_time": 0,
        "period_critical_enabled": false,
        "period_critical_mode": 0,
        "burst_warning_clear_time": 0,
        "period_warning_enabled": false,
        "period_warning_upper_limit": 0,
        "period_major_lower_limit": 0,
        "burst_critical_upper_limit": 0,
        "period_minor_time": 0,
        "burst_warning_enabled": false,
        "period_major_enabled": false,
        "period_minor_mode": 0,
        "burst_minor_clear_time": 0,
        "burst_minor_lower_limit": 0,
        "burst_warning_lower_limit": 0,
        "burst_major_clear_occurrence": 0,
        "burst_warning_upper_limit": 0,
        "burst_critical_mode": 0,
        "burst_minor_clear_occurrence": 0,
        "burst_minor_upper_limit": 0,
        "burst_warning_time": 0,
        "burst_warning_occurrence": 0,
        "burst_minor_mode": 0,
        "period_major_mode": 0,
        "period_generate_event": true,
        "period_major_upper_limit": 0,
        "burst_generate_event": true,
        "burst_enabled": true,
        "burst_critical_clear_time": 0,
        "period_minor_lower_limit": 0,
        "burst_critical_occurrence": 0,
        "burst_warning_clear_occurrence": 0,
        "schedule": "DailySchedule",
        "burst_major_time": 0,
        "period_critical_upper_limit": 0,
        "schedule_desc": "Daily",
        "period_major_time": 0,
        "period_warning_time": 0,
        "burst_minor_enabled": false,
        "baseline_enabled": false,
        "burst_major_enabled": false,
        "period_enabled": false,
        "period_minor_enabled": false,
        "burst_major_mode": 0,
        "burst_reset_time": 0,
        "period_warning_lower_limit": 0,
        "burst_critical_clear_occurrence": 0,
        "period_minor_upper_limit": 0,
        "burst_minor_time": 0,
        "burst_major_occurrence": 0,
        "period_warning_mode": 0
      }
    ],
    "threshold_group": [],
    "metric": "Environment.Fan.State",
    "can_edit": true,
    "owner": "npiadmin",
    "update_time": 1711348868638
  }
]
Field Description
burst_major_clear_time  
active_until  
name  
creation_time  
period_critical_time  
target_rule  
period_granularity  
burst_major_clear_occurence  
burst_critical_enabled  
burst_critical_time  
period_critical_enabled  
burst_warning_clear_time  
period_critical_level  
burst_major_occurence  
period_minor_level  
period_warning_enabled  
burst_minor_clear_occurence  
burst_major_level  
period_minor_time  
burst_warning_enabled  
period_major_enabled  
burst_minor_clear_time  
burst_warning_level  
period_mode  
burst_warning_clear_occurence  
burst_warning_time  
burst_mode  
period_generate_event  
burst_generate_event  
burst_enabled  
burst_critical_clear_time  
resource  
burst_critical_level  
threshold_group  
metric  
period_warning_level  
schedule  
burst_major_time  
schedule_desc  
burst_warning_occurence  
period_major_time  
burst_critical_clear_occurence  
period_warning_time  
burst_minor_enabled  
baseline_enabled  
burst_major_enabled  
period_enabled  
period_minor_enabled  
burst_reset_time  
burst_minor_level  
burst_minor_occurence  
period_major_level  
burst_minor_time  
update_time  
burst_critical_occurence  
Update Threshold definitions
curl -k --cookie mycookie  -X PUT -H "Content-Type: application/json" -d @sampleTD.json -k https://<hostname>:<port>/threshold/rest/threshold/update
Delete Threshold definitions
curl -k --cookie mycookie  -X DELETE -H "Content-Type: application/json" -d @sampleTD.json -k https://<hostname>:<port>/threshold/rest/threshold/delete
Import Threshold definitions
curl -k --cookie mycookie  -X POST -H "Content-Type: application/json" -d @sampleTD.json -k https://<hostname>:<port>/threshold/rest/threshold/import

SNMP Discovery profile

For more information about configuring SNMP Discovery profiles from UI, see Managing SNMP Discovery profiles.

List all SNMP Discovery profiles
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/list
Run Discovery for the exiting profiles
$ curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?discover-profile=”profile_name
Run Discovery for a specific agent
sudo curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?discover-agent=”agent_name
Run Discovery for all profiles
curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?discover-all
Create Discovery profiles
sudo curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat discoveryProf.json[
{
      "HOST_NAMES":"",
      "ENABLED":false,
      "NAME":"<Agent101toAgent231>",
      "IS_RUNNING":"Completed",
      "IP_ADDRESSES":"<10.55.236.101-10.55.236.221>",
      "LAST_RUN":1652784011691,
      "STATUS":"Discovered 4/121 in 135129 ms",
      "REMOTE_CONTEXT":"",
      "FAILED_LIST":"<10.55.236.101>,<10.55.236.160>,<10.55.236.145>,<10.55.236.175>",
      "SNMP_CREDENTIAL":""
   }
]
Fields Description
NAME Name for the discovery profile.
ENABLED Flag to enable or disable the profile.
IP_ADDRESSES

Provide the IP address range that defines the scope of the devices to be discovered.

Values in this field can be as follows:
  • IP address range

    For example, 10.55.239.137-10.55.239.140

  • Individual IP addresses as a comma-separated list

    For example, 10.55.239.31, 10.55.240.45

  • Combination of both

    For example, 10.55.239.137-10.55.239.140,10.55.239.31

Note: IPv6 address format is supported.
HOST_NAMES Comma-separated list of hostnames. For example, hostname1, hostname2.
REMOTE_CONTEXT The same name of the remote context that you mentioned in the application.conf file to set up the remote SNMP discovery and collection.
IS_RUNNING Flag to understand if the discovery is currently running for the profile.
LAST_RUN The last run date of the discovery profile. If a profile is newly created and the discovery is yet to run, this column displays the value Not run.
STATUS The discovery status as Completed, Not run, or In progress.
FAILED_LIST If one or more devices from the discovery profile are not discovered for any reason, the IP addresses or the hostnames of the devices that are not discovered from the profile are listed.
Update Discovery profiles
sudo curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/update
Delete Discovery profiles
sudo curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/delete
Import Discovery profiles
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/import
Count of existing Discovery profiles
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/profile/count
Run the discovery for a profile in Test mode
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?test-profile=<profile_name>
Run the discovery for a profile in Live mode
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?run-profile=<profile_name>
Get the discovery logs
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?logs=<profile_name>
Stop the discovery for a profile
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/discovery?stop-profile=<profile_name>

SNMP credentials

For more information about configuring SNMP credentials from UI, see Managing SNMP credentials.

List all SNMP credentials
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/list
Count of existing SNMP credentials
curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/count
Create SNMP credentials
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat SNMPcred.json
[
    {
        "NAME": "C1",
        "VERSION": 1,
        "PORT": 161,
        "READ_COMMUNITY": "public",
        "WRITE_COMMUNITY": "",
        "USERNAME": "",
        "AUTHENTICATION": "",
        "AUTHENTICATION_PASSWORD": "",
        "ENCRYPTION": "",
        "ENCCONTEXTRYPTION_PASSWORD": "",
        "CONTEXT": "",
        "PRIORITY": 0,
        "RETRIES": 7,
        "TIMEOUT": 7000,
        "LEVEL": ""
    }
]
Fields Description
NAME Credential name
VERSION
Specify the SNMP version that is associated with this SNMP configuration. Make sure to select the version that is supported on the device. SNMP versions are as follows:
  • V1

    Basic version of SNMP. This version is supported by most devices and simple to set up. It has limited security.

  • V2

    Supports 64-bit counters to monitor the bandwidth usage of networks high volumes of data. It has limited security.

  • V3

    Supports authentication and encryption of the credentials for multiple users. Highly secure version.

PORT SNMP port. By default, it is 161.
READ_COMMUNITY

Specify the name of the SNMP read community. It is used to retrieve the information from a device in read-only mode. SNMP community string is like the user ID or password and is needed for SNMP V1 and V2 versions only. SNMP V3 version uses username and password credentials with encryption key.

By default, the SNMP community strings for SNMP V1 and V2 versions are set to Public. You can change all the community strings to customized values in this field.

WRITE_COMMUNITY SNMP write community.
USERNAME

Security Name is used when access control is set up.

AUTHENTICATION
This field is applicable if the level is authPriv to specify the type of encryption for the privacy password. The following types of encryption are available:
  • DES
  • AES128
  • AES192
  • AES256
AUTHENTICATION_PASSWORD
Privacy password. It must be same as the device privacy password.
Note: The minimum length of the Priv password must be eight characters.
ENCRYPTION
This field is applicable if the level is AuthNoPriv and AuthPriv to specify the type of encryption for the authentication password. The following types of encryption are available:
  • SHA1
  • MD5
ENCRYPTION_PASSWORD Auth password
CONTEXT

An SNMP context defines a collection of management information that is accessible to an SNMP entity. Each context in a management domain has a unique identifier. The Context Name field is optional and depends on the user.

PRIORITY Priority
RETRIES

Specify how many times that you want the SNMP helper and polling operations to attempt to access a device.

TIMEOUT

Specify the time in milliseconds to wait for a reply from SNMP request before the timeout.

LEVEL
Specify the needed level of authentication and privacy. The following levels are available:
  • noAuthNoPriv

    Select this option for SNMP communities that have no authentication or private key. In this case, you do not need to specify any passwords. Then, specify the Context Name and Security Name.

  • AuthNoPriv

    Select this option for SNMP communities that have an authentication key but no private key. Then, specify values in the Auth Type, Context Name, Security Name, and Auth Password fields.

    Note: The minimum length of the Auth Password must be eight characters and provide the same password that is set on the device.
  • AuthPriv

    Select this option for SNMP communities that have both an authentication and a private key. Then, specify values in the Auth type, Priv type, Priv password, Context name, Security name, Auth password, Priv password fields.

    Note: The minimum length of the Priv password must be eight characters and provide the same password that is set on the device.
Update SNMP credentials
sudo curl -k --cookie cookie.txt -X PUT -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/update
Delete SNMP credentials
curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/delete
Import SNMP credentials
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/snmp-discovery/rest/credential/import

Batch analytics

For more information about configuring Batch jobs from UI, see Managing batch jobs for metrics.

List all Batch jobs
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/job/list
Count of existing Batch jobs
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/job/count
Create Batch jobs
curl -k -–cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat BAjob.json
[
{
        "createTime": 1639029708786,
        "definition": {
            "focalEntity": "eNodeBFunction",
            "groupBy": "HOUR",
            "lastUnit": "HOUR",
            "lastValue": 1,
            "metricList": [
                "eUtranCell!eUtranCell.Huawei_4G_Cell_Availability_Percent",
                "eUtranCell!eUtranCell.Huawei_4G_ERAB_Drop_Rate_Percent",
                "eUtranCell!eUtranCell.Huawei_4G_ERAB_Establish_Success_Rate_Percent",
                "eUtranCell!eUtranCell.Huawei_4G_Mobility_Success_Rate_Percent",
                "eUtranCell!eUtranCell.Huawei_4G_RRC_Setup_Success_Rate_Percent"
            ],
            "reportName": "PS_ACCESS_HUAWEI_4G_JOB_ENODEBFUNCTION",
            "resourceFilter": [],
            "vendorFilter": []
        },
        "enableFlag": true,
        "jobName": "PS_ACCESS_HUAWEI_4G_JOB_ENODEBFUNCTION",
        "scheduleName": "EVERYHOURBYMIN10",
        "updateTime": 1639029708786
    }
]
Field Description
createTime Timestamp when the job is created.
focalEntity Focal Resource type from where the metrics can be selected for a specific Resource type.
groupBy Select any of the following options:
  • 15 Min
  • 30 Min
  • Hour
  • Day
Based on the time attribute selected, the data is rolled up or aggregated for that timeframe.
lastUnit It is the relative calculation period unit, hour, or day. Select a value from the following options:
  • Hour
  • Day
lastValue

Last value defines the time period for which data that is available in Diamond-db is processed by a job. It is the relative calculation period based on Last unit. The maximum value can be 168, which is 7*24.

Value depends on the selected last unit. If Last unit is Hour, then select any value 1 - 168. If Last unit is Day, then select any value 1 - 7.

Consider the following options to calculate daily summaries:
  • Group by is Day.
  • Last unit is Day.
  • Last value is 1.
  • Schedule name is EVERYDAY or EVERYDAYBYHOUR2.
Consider the following options to calculate hourly summaries:
  • Group by is Hour.
  • Last unit is Hour.
  • Last value is 1.
  • Schedule name is EVERYHOUR or EVERYHOURBYMIN10.
metricList Select a metric type from the following options:
  • Analytic

    It represents the metrics that come from batch jobs, streams, and stored busy hour definitions that are defined by users.

  • Metric

    It represents the raw metrics that come from installed Technology Packs.

  • UDC

    It represents the metrics that are created by user.

Metrics that are available in the selected field type are displayed.

Select a single metric or multiple metrics and click the arrow (Arrow icon) to move the selected metric to the Selected metrics pane.

Click Delete metrics (Delete metrics icon) to delete the selected metric.

reportName Dashboard name
resourceFilter Resource type hierarchy.
vendorFilter Vendor type hierarchy
enableFlag Enable or disable the batch job.
jobName Provide a name for the batch job.
scheduleName Select the schedule name from the following options:
  • EVERYHOUR
  • EVERYHOURBYMIN10
  • EVERYDAY
  • EVERYWEEK
  • EVERYMONTH
updateTime Timestamp when the job is updated.
Update Batch jobs
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/update
Delete Batch jobs
curl -k –cookie cookie.txt -X DELETE -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/delete
Import Batch jobs
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/import
Enable Batch jobs
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/enable
Disable Batch jobs
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/job/disable

Stored Busy hours

For more information about configuring Stored Busy hours from UI, see Managing Busy hours.

List all stored Busy hours
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/list
Count of existing stored Busy hours
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/count
Create stored Busy hour definitions
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/create 
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
[
  {
    "JOB_NAME": "test",
    "JOB_TYPE": "BUSYHOUR",
    "DEFINITION": {
      "aggr": "max",
      "childResourceFilter": "",
      "determiner": {
        "aggr": [
          "Sum"
        ],
        "entity": "device",
        "name": "CPU.Utilization.Percent"
      },
      "end": "",
      "focalEntity": "device",
      "focalType": "resourceType",
      "granularity": "1-day",
      "jobType": "default",
      "metricList": [],
      "name": "test",
      "period": {
        "endHour": 23,
        "startHour": 0
      },
      "rank": 1,
      "resourceFilter": "resource.id == '127.0.0.1'",
      "slidingInterval": "",
      "slidingMode": "nonsliding",
      "start": "",
      "time": "last-day",
      "timezone": "UTC"
    },
    "EVENT_TYPE": "SCHEDULE",
    "EVENT_NAME": "EVERYDAY",
    "UPDATE_TIME": 1710132023639,
    "CREATE_TIME": 1710132023639,
    "ENABLE_FLAG": true
  }
]
Field Description
createTime Timestamp when the Busy hour is created.
aggr Use any of the following options:
  • min
  • max
Smallest or largest value to be used for the busy hour, min, or max. If a value is omitted, the default max is used. max uses the greatest value for the busy hour. min uses the smallest value for the busy hour. For example, min is used where a metric represents the percentage of a channel's availability - the busier the equipment the less percentage availability there is.
calculationType Sliding type. Use either sliding or nonsliding mode. By default, the value for this parameter is nonsliding.

A sliding busy hour is a busy hour that is calculated based on the busiest hour of the day, across intervals other than hourly boundaries.

The default interval for sliding busy hours is 15 minutes. Using this interval that a sliding busy hour can start at any 15-minute interval of an hour and extend thereafter for 60 minutes. For example, from 10:15 to 11:15 or 10:30 to 11:30.

Nonsliding means that the busy hour is always aligned to hours, for example 14:00 to 15:00 or 18:00 to 19:00. Sliding busy hours are calculated down to the interval of the data, for example 14:15 to 15:15.

determiner It is the metric that is used to determine the busiest hour. Metrics that are used for busy hour determination typically represent a suitable metric for measuring how busy a system is
focalEntity Focal Resource type from where the metrics can be selected for a specific Resource type. It is the main Resource type from which you want to view metrics.
groupBy  
metricList Array of metric names that must be included in the Busy hour definition.
resourceFilter Array of Resource type names that must be included in the Busy hour definition.
sbhName Stored Busy hour name
vendorFilter Array of vendors that must be included in the Busy hour definition.
enableFlag Flag to enable or disable the Busy hour definition.
sbhName Busy hour definition name
scheduleName
It is the schedule type and has the following options:
  • EVERYHOUR
  • EVERYHOURBYMIN10
  • EVERYDAY
  • EVERYWEEK
  • EVERYMONTH
updateTime Timestamp when the Busy hour definition is created or modified.
Update stored Busy hour definitions
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/update
Delete stored Busy hour definitions
curl -k –-cookie cookie.txt -X DELETE -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/delete
Import stored Busy hour definitions
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/import
Enable stored Busy hour definitions
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/enable
Disable stored Busy hour definitions
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/sbh/disable

Streaming analytics

For more information about configuring analytics streams from UI, see Managing streams for metrics.

List all streams
curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/list
Create streams
curl -k –-cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
$ cat Stream.json
[
{
        "createTime": 1639592254247,
        "focalEntity": "device",
        "groupBy": "15_MIN",
        "metricList": [
            {
                "aggr": [
                    "Sum"
                ],
                "name": "device!ICMP.Message.Received.pps"
            }
        ],
        "statuses": [],
        "streamName": "Stream",
        "updateTime": 1639592254247
    }
]
Field Description
createTime Timestamp when the stream is created.
focalEntity Focal Resource type from where the metrics can be selected for a specific Resource type. It is the main Resource type from which you want to view metrics.
groupBy

Use any of the following options:

1_MIN

5_MIN

15_MIN

30_MIN

60_MIN

Based on the time attribute selected the data is rolled up or aggregated for that timeframe.

metricList
aggr Aggregation used
name Name of the metric used in the stream creation.
statuses Status of the stream. It can be start or stop.
streamName Name of the stream
updateTime Timestamp when the stream is updated.
Update streams
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/update
Delete streams
curl -k –cookie cookie.txt -X DELETE -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/delete
Count of existing streams
curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/count
Import streams
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/import
Start streams
curl -k –cookie cookie.txt -X PUT -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/start
Stop streams
curl -k –cookie cookie.txt -X PUT -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/stream/stop

User-defined calculations (UDC)

For more information about configuring UDCs from UI, see Managing User-defined calculations.

List all UDCs
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/udcconfig/list
Create UDCs
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/udcconfig/create
[
  {
    "AGGREGATION": "Average",
    "CAN_EDIT": true,
    "DATA_TYPE": "DOUBLE",
    "DESCRIPTION": "Number of requests for inter-MSC handovers from the cells (serving RNC) controlled by local MSC to the cells (target RNC) controlled by other MSC.",
    "FIELD_TYPE": "UserDefined",
    "FOCAL_ENTITY": "hoTypeMSC",
    "FORMULA": "[hoTypeMSC]![{hoTypeMSC.Basic.Outgoing.Handover.Requests}] +100",
    "MODIFIED": 1711348672739,
    "OWNER": "npiadmin",
    "PARSED_FORMULA": "",
    "UDC_CONFIG_NAME": "hoTypeMSC.SampleUDC",
    "USER_GROUPS": "Group1,Group2"
  }
]
Field Description
AGGREGATION Aggregation type to be used in the UDC.
DATA_TYPE Data type of the UDC
DESCRIPTION Description of the UDC
FIELD_TYPE Field type has the following options:
  • UDC

    It represents the metrics that are created by user.

  • Metric

    It represents the raw metrics that come from installed Technology Packs.

  • Analytic

    It represents the metrics that come from batch jobs, streams, and busy hour definitions that are defined by users.

FOCAL_ENTITY Focal Resource type from where the metrics can be selected for a specific Resource type and to which you want to apply the UDC. It is the main Resource type from which you want to view metrics.
FORMULA Function to be used in the UDC definition.
MODIFIED Timestamp when the UDC is created or modified.
OWNER Owner who created the UDC.
PARSED_FORMULA Validated formula.
UDC_CONFIG_NAME UDC name
Update UDCs
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/udcconfig/update
Delete UDCs
curl -k –cookie cookie.txt -X DELETE -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-batch/rest/udcconfig/delete
Count of existing UDCs
curl -k –cookie cookie.txt https://<hostname>:<dashboard_port>/analytics-batch/rest/udcconfig/count
Import UDCs
curl -k –cookie cookie.txt -X POST -H “Content-Type: application/json” -d @profile.json -k https://<hostname>:<dashboard_port>/analytics-stream/rest/udcconfig/import

Site groups

For more information about configuring Sites from UI, see Managing site grouping.

List all existing Site groups
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/app/sites/list
Create Sites
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/app/sites/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
[
    {
        "siteName": "Site",
        "ipRange": "10.55.239.137",
        "priority": 0
    }
]
Field Description
siteName Logical name to the site. Create your site by location.
ipRange Provide the IP address range that defines the scope of the devices for site grouping.
priority Priority
Update Sites
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/app/sites/update
Delete Sites
curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/app/sites/delete
Count of existing Sites
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/app/sites/count
Import Sites
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json -k https://<hostname>:<dashboard_port>/app/sites/import

Inventory

For more information about configuring Resource types from UI, see Managing Resource types.

List all Resource types
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/resources?type=device
Create Resource types
Note: If a resource already exists, it is updated based on the POST request if not, it is inserted.
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/resources/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
{
  "resources": [
    {
      "id": "10.55.239.131_interface:<3>",
      "type": "interface",
      "bandwidth": "100000"
    }
  ]
}
Field Description
id Specify an ID for the Resource type.
type Resource type name
bandwidth The volume of information that can be sent over a connection in a measured amount of time. It is calculated in megabits per second (Mbps).
Delete Resource types
curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/resources/delete
Update Resource types
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/resources/create
Create relation
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/relations/create
Sample reference of input file for POST request. The JSON file format for all other POST request is similar.
[
  {
    "relations": {
      "source": {
        "id": "10.10.10.1",
        "type": "device"
      },
      "target": {
        "id": "10.10.10.1_interface:<10>",
        "type": "interface"
      },
      "type": "contain"
    }
  }
]
Field Description
source Source details in the relation
id Source ID
type Source Resource type
target Target details in the relation
id Target ID
type Target Resource type
Delete relation
curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/relations/delete
Get all descendants
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/resources/descendants?source_type=device&source_id=10.55.239.31
Get all ascendents
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/resources/ancestor?source_type=interface&source_type=interface&source_id=10.10.10.1_interface:<10>

Group configuration or Resource grouping

For more information about configuring Resource groups, see

List all groups
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
List specific group
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/groups ?groupName=<group definition name> 
Count
curl -k --cookie cookie.txt https://<hostname>:<dashboard_port>/inventory/rest/topology/groups/count
Create static group

To create a static group you must provide group member resources. Backend will group the provided resources.

curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
Sample reference of input file
{
   "startTime":0,
   "groupType":"static",
   "relation":"groupOf",
   "description":"",
   "condition":"",
   "groupBy":"",
   "groupName":"testStatic",
   "status":"ACTIVE",
   "updateTime":1641207969369,
   "resources":[
      {
         "id":"AUH02/BSC03-001",
         "type":"bsc",
         "tenant":"base"
      },
      {
         "id":"AUH02/BSC04-001",
         "type":"bsc",
         "tenant":"base"
      }
   ]
}
Create a dynamic group (In active mode)

In dynamic grouping group membership decided base group condition provided. Backend also internally sub group resources based on resource properties if groupBy is provided. If a dynamic group created in active mode, the group definition is added and grouping is initialized.

curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
Sample reference of input file
{
   "startTime":0,
   "groupType":"dynamic",
   "relation":"groupOf",
   "description":"",
   "condition":"resource.type=='device'",
   "groupBy":"",
   "groupName":"testDynamic",
   "status":"ACTIVE",
   "updateTime":1641209478572,
   "resources":""
}
Create a dynamic group (In inactive mode)
If a dynamic group is created in inactive mode, group definition is added but grouping not initialized.
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
Sample reference of input file
{
   "startTime":0,
   "groupType":"dynamic",
   "relation":"groupOf",
   "description":"",
   "condition":"resource.type=='device'",
   "groupBy":"",
   "groupName":"testDynamic",
   "status":"INACTIVE",
   "updateTime":1641209478572,
   "resources":""
}
Validate groups
Validation request validates the group definition and returns group hierarchy build after the group creation. Validation does not create any grouping at the backend.
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/validate
Sample reference of input file
{
   "startTime":1641209469011,
   "groupType":"dynamic",
   "relation":"groupOf",
   "description":"",
   "condition":"resource.type=='device'",
   "groupBy":"",
   "groupName":"testDynamic",
   "status":"ACTIVE",
   "updateTime":1641209478572
}
Update group
curl -k --cookie cookie.txt -X PUT -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
Sample reference of input file
{
   "startTime":1640768829810,
   "groupType":"dynamic",
   "relation":"groupOf",
   "description":"kl/10.212.7.244 a",
   "condition":"resource.remoteContext=='kl' && resource.type=='device'",
   "groupBy":"",
   "groupName":"DynamicGroup_kl/10.212.7.244",
   "status":"ACTIVE",
   "updateTime":1641378345533,
   "resources":""
}
Delete group
curl -k --cookie cookie.txt -X DELETE -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups
Sample reference of input file
[
   {
      "startTime":1640771073162,
      "groupType":"dynamic",
      "relation":"groupOf",
      "description":"DynamicGroup_IND/10.212.7.244",
      "condition":"resource.remoteContext=='IND' && resource.type=='device'",
      "groupBy":"",
      "groupName":"DynamicGroup_IND/10.212.7.244",
      "status":"ACTIVE",
      "resources":"",
      "updateTime":1640771079025
   }
]
inactivate group
Inactivating group stops the group membership reconciliation.
curl -k --cookie cookie.txt -X PUT -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups/inactivate
Sample reference of input file
[
   {
      "startTime":1640768829810,
      "groupType":"dynamic",
      "relation":"groupOf",
      "description":"kl/10.212.7.244 a",
      "condition":"resource.remoteContext=='kl' && resource.type=='device'",
      "groupBy":"",
      "groupName":"DynamicGroup_kl/10.212.7.244",
      "status":"INACTIVE",
      "resources":"",
      "updateTime":1641378345533
   }
]
Activate group
Activating the group initializes an inactive group hierarchy and backend starts to monitor members that are updated to reconcile group.
curl -k --cookie cookie.txt -X PUT -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups/inactivate
Sample reference of input file
[
   {
      "startTime":1641374519766,
      "groupType":"dynamic",
      "relation":"groupOf",
      "description":"",
      "condition":"resource.type=='powerSupplies'",
      "groupBy":"",
      "groupName":"testDynamic",
      "status":"ACTIVE",
      "resources":"",
      "updateTime":1641387213311
   }
]
Import group
Helps to add group definitions in bulk.
Note: When dynamic group condition is too generic and more definitions are in import, group membership evaluation and group initialization are heavy operations. It might have performance impact.
curl -k --cookie cookie.txt -X POST -H "Content-Type: application/json" -d @profile.json https://<hostname>:<dashboard_port>/inventory/rest/topology/groups/import
Sample reference of input file
[
   {
      "startTime":1641374519766,
      "groupType":"dynamic",
      "relation":"groupOf",
      "description":"",
      "condition":"resource.type=='powerSupplies'",
      "groupBy":"",
      "groupName":"testDynamicImport",
      "status":"ACTIVE",
      "resources":"",
      "updateTime":1641387223875
   },
   {
      "startTime":1641374370710,
      "groupType":"static",
      "relation":"groupOf",
      "description":"",
      "condition":"",
      "groupBy":"",
      "groupName":"testStaticImport",
      "status":"ACTIVE",
      "resources":[
         {
            "id":"schztxce-d2325618-001/controller-0",
            "tenant":"base",
            "type":"kubernetesNode"
         },
         {
            "id":"hnrtnycr-d5063707-001/controller-0",
            "tenant":"base",
            "type":"kubernetesNode"
         }
      ],
      "updateTime":1641374370970
   }
]