API device EN: различия между версиями

Материал из WiKi - UserSide
Нет описания правки
(Fix Ukrainian API localization)
 
(не показано 12 промежуточных версий 2 участников)
Строка 1: Строка 1:
[[API_device_EN|en]] | [[API_device|ru]]
'''en''' | [[API_device_UK|uk]] | [[API device|ru]]


Section '''[[API_EN|API]]''' ERP "UserSide"
Section '''[[API_EN|API]]''' ERP "UserSide"
Строка 9: Строка 9:


== Subcategories ==
== Subcategories ==
==== add_mark ====
''Modified in 3.19beta1 (object_type parameter removed)''
Description: Add a mark
Required parameters:
  object_type - Device type [switch] ''(before version 3.19beta1)''
  object_id - device id
  mark_id - mark ID


==== get_connected_ont_information ====
==== get_connected_ont_information ====
''Added in: 3.14.13''
''Added in: 3.14.13''


  Description: Obtain information about connected ONUs/ONTs to OLT ''(stored information from the database. Direct polling is not performed)''
  Description: Get information about ONUs connected to an OLT ''(stored database information. Direct polling is not performed)''
  Optional parameters:
  Optional parameters:
   device_id - OLT ID ''(can be comma separated)''
   device_id - OLT ID ''(can be comma separated)''
   level_onu_rx_min - minimum incoming signal level on ONU/ONT ''(select records with level less than...)''
   level_onu_rx_min - minimum incoming signal level on ONU ''(select records with level less than...)''
   level_onu_rx_max - maximum incoming signal level on ONU/ONT ''(select records with level higher than...)''
   level_onu_rx_max - maximum incoming signal level on ONU ''(select records with level higher than...)''


==== get_current_ont_data ====
==== get_current_ont_data ====
Строка 23: Строка 33:
''Added with: 3.16dev4''
''Added with: 3.16dev4''


  Description: Get some current information on ONT/ONU ''(directly from OLT)''
  Description: Get current ONU information ''(directly from OLT)''
  Required parameters:
  Required parameters:
   id - device id ''(ONU/ONT)''
   id - device id ''(ONU)''


==== get_device_id ====
==== get_device_id ====
''Modified in 3.19beta1 (object_type parameter removed)''
''Modified in: 3.13.63 (added possible serial_number value to data_typer)''
''Modified in: 3.13.63 (added possible serial_number value to data_typer)''


''Modified in: 3.12.95 (added possible mac value to data_typer)''
''Modified in: 3.12.95 (added possible mac value to data_typer)''
  Description: Retrieve device ID from incoming data
  Description: Retrieve device ID from input data
  Required parameters:
  Required parameters:
   object_type - device type [switch]
   object_type - device type [switch] ''(before version 3.19beta1)''
   data_typer - type of data to be checked ''(possible values: ip, mac, inventory_number, serial_number, additional_field_XXX)''
   data_typer - type of data to be checked ''(possible values: ip, mac, inventory_number, serial_number, additional_field_XXX)''
   data_value - value
   data_value - value


==== get_data ====
==== get_data ====
''Modified in 3.20.2 (added is_with_ip parameter)''
''Modified in 3.19.15 (added customer_id parameter)''
''Modified in 3.19beta1 (added dataset parameter)''
''Modified in: 3.18.4 (added is_hide_access_data parameter)''
''Modified in: 3.18.4 (added is_hide_access_data parameter)''


Строка 48: Строка 66:
''Modified in: 3.12.38 (added object_type=all)''
''Modified in: 3.12.38 (added object_type=all)''
  Description: Retrieve device information
  Description: Retrieve device information
  Obligatory parameters:
  Required parameters:
   object_type - Device type [switch|onu|olt|radio|all]
   object_type - Device type [switch|onu|olt|radio|all]
  Optional parameters:
  Optional parameters:
   node_id - id of the communication facility ''(can be comma separated)''
   customer_id - customer id ''(can be comma separated)''
   object_id - id of the object to be selected
   dataset - list of fields to output ''(comma separated)''
   is_online - flag - select only active devices ''(1 - active, -1 - inactive)''
   is_online - flag - select only active devices ''(1 - active, -1 - inactive)''
   is_hide_ifaces_data - flag - hide detailed information on equipment interfaces
   is_hide_ifaces_data - flag - hide detailed information on equipment interfaces
   is_hide_access_data - flag - hide information on equipment access parameters
   is_hide_access_data - flag - hide information on equipment access parameters
  is_with_ip - flag - only with IP addresses
  node_id - infrastructure facility id ''(can be comma separated)''
  object_id - id of the object to be selected


==== get_iface_info ====
==== get_iface_info ====
Строка 61: Строка 82:
''Added with: 3.17dev1''
''Added with: 3.17dev1''


  Description: Get current information on interfaces ''(directly from the device)''
  Description: Get current interface information ''(directly from the device)''
  Required parameters:
  Required parameters:
   id - device id
   id - device id


==== get_iface_mac ====
==== get_iface_mac ====
''Modified in 3.19beta1 (object_type parameter removed)''
''Added with: 3.12beta25''
''Added with: 3.12beta25''
  Description: List of interfaces with MAC addresses on the device
  Description: List of interfaces with MAC addresses on the device
  Required parameters:
  Required parameters:
   object_type - Device type [switch]
   object_type - Device type [switch] ''(before version 3.19beta1)''
   object_id - id of the device to be sampled
   object_id - id of the device to be sampled


==== get_mac_list ====
==== get_mac_list ====
''Modified in 3.19beta1 (object_type parameter removed, object_id list made optional)''
  Description: Get a list of MAC addresses that were found on the device
  Description: Get a list of MAC addresses that were found on the device
  Obligatory parameters:
  Required parameters:
   object_type - Device type [switch]
   object_type - Device type [switch] ''(before version 3.19beta1)''
  object_id - id of the device to be sampled
  Optional parameters:
  Optional parameters:
   interface_list - Interface number for which to output the list (can be comma separated)
   interface_list - Interface number for which to output the list (can be comma separated)
  object_id - id of the device to be sampled


==== get_ont_data ====
==== get_ont_data ====
Строка 85: Строка 112:
''Added from: 3.12.81''
''Added from: 3.12.81''


  Description: Get the latest information on ONT/ONU
  Description: Get the latest information on ONU
  Obligatory parameters:
  Required parameters:
   id - MAC address or serial number ''(id)''
   id - MAC address or serial number ''(id)''
   or
   or
   device_id - device id ''(ONU/ONT)''
   device_id - device id ''(ONU)''


==== get_pon_level_history ====
==== get_pon_level_history ====
Строка 100: Строка 127:
''Added from: 3.12.53''
''Added from: 3.12.53''


  Description: Obtain history of PON signal levels by ONU/ONT
  Description: Get PON signal level history for an ONU
  Obligatory parameters:
  Required parameters:
   onu_name - MAC address or serial number of ONU/ONT ''(without separators)''
   onu_name - MAC address or serial number of ONU ''(without separators)''
   or
   or
   device_id - device id ''(OLT)''
   device_id - device id ''(OLT)''
Строка 108: Строка 135:
   onu_device_id - device id ''(ONU)''
   onu_device_id - device id ''(ONU)''
  Optional parameters:
  Optional parameters:
   limit - limit of the list of output data
   limit - output data limit
   order_by - data sorting field
   order_by - data sorting field
   is_desc - flag - sorting in reverse order
   is_desc - flag - sorting in reverse order


==== add_mark ====
==== delete_mark ====
Description: Adding a mark
 
Obligatory parameters:
''Modified in 3.19beta1 (object_type parameter removed)''
  object_type - Device type [switch]
  object_id - device id
  mark_id - mark ID


==== delete_mark ====
  Description: Remove a mark
  Description: Mark removal
  Required parameters:
  Obligatory parameters:
   object_type - Device type [switch] ''(before version 3.19beta1)''
   object_type - Device type [switch]
   object_id - device id
   object_id - device id
   mark_id - mark ID
   mark_id - mark ID
Строка 133: Строка 156:


==== set_data ====
==== set_data ====
''Modified in 3.19beta1 (object_type parameter removed)''
''Modified in 3.17dev1 (added possible value of date_last_activity to param)''
''Modified in 3.17dev1 (added possible value of date_last_activity to param)''


Строка 141: Строка 167:
''Modified in 3.12.74 (added possible value of comment to param)''
''Modified in 3.12.74 (added possible value of comment to param)''
  Description: Change device information
  Description: Change device information
  Obligatory parameters:
  Required parameters:
   object_type - Device type [switch]
   object_type - Device type [switch] ''(before version 3.19beta1)''
   object_id - device id
   object_id - device id
   param - type of parameter to change [ip|mac|comment|iface_count|downlink_port|uplink_port|date_last_activity]
   param - type of parameter to change [ip|mac|comment|iface_count|downlink_port|uplink_port|date_last_activity]
Строка 150: Строка 176:


''Added with: 3.15beta3''
''Added with: 3.15beta3''
  Description: Changes the state of the interface on the device
  Description: Change interface state on a device
  Obligatory parameters:
  Required parameters:
   device_id - device id
   device_id - device id
   iface - interface number
   iface - interface number
Строка 158: Строка 184:
==== find_mac ====
==== find_mac ====
''Added in: 3.12beta25''
''Added in: 3.12beta25''
  Description: Search for MAC address in the polling history by hardware
  Description: Search for a MAC address in equipment polling history
  Required parameters:
  Required parameters:
   mac - MAC address ''(upper case without separators)''
   mac - MAC address ''(upper case without separators)''
==== get_relation_customers ====
''Added in: 3.19.45''
Description: Retrieve information about dependent customers
Required parameters:
  device_id - device id
Optional parameters:
  port_start - starting port number
  port_finish - ending port number

Текущая версия от 11:37, 10 мая 2026

en | uk | ru

Section API ERP "UserSide"

Purpose: Equipment

Additional parameters:
action - request subcategory (possible value: see below)

Subcategories

add_mark

Modified in 3.19beta1 (object_type parameter removed)

Description: Add a mark
Required parameters:
 object_type - Device type [switch] (before version 3.19beta1)
 object_id - device id
 mark_id - mark ID

get_connected_ont_information

Added in: 3.14.13

Description: Get information about ONUs connected to an OLT (stored database information. Direct polling is not performed)
Optional parameters:
 device_id - OLT ID (can be comma separated)
 level_onu_rx_min - minimum incoming signal level on ONU (select records with level less than...)
 level_onu_rx_max - maximum incoming signal level on ONU (select records with level higher than...)

get_current_ont_data

Added with: 3.16dev4

Description: Get current ONU information (directly from OLT)
Required parameters:
 id - device id (ONU)

get_device_id

Modified in 3.19beta1 (object_type parameter removed)

Modified in: 3.13.63 (added possible serial_number value to data_typer)

Modified in: 3.12.95 (added possible mac value to data_typer)

Description: Retrieve device ID from input data
Required parameters:
 object_type - device type [switch] (before version 3.19beta1)
 data_typer - type of data to be checked (possible values: ip, mac, inventory_number, serial_number, additional_field_XXX)
 data_value - value

get_data

Modified in 3.20.2 (added is_with_ip parameter)

Modified in 3.19.15 (added customer_id parameter)

Modified in 3.19beta1 (added dataset parameter)

Modified in: 3.18.4 (added is_hide_access_data parameter)

Modified in: 3.17beta1 (added node_id parameter)

Modified in: 3.15.18 (added object_type=olt)

Modified in: 3.14.14 (added is_hide_ifaces_data parameter)

Modified in: 3.12.38 (added object_type=all)

Description: Retrieve device information
Required parameters:
 object_type - Device type [switch|onu|olt|radio|all]
Optional parameters:
 customer_id - customer id (can be comma separated)
 dataset - list of fields to output (comma separated)
 is_online - flag - select only active devices (1 - active, -1 - inactive)
 is_hide_ifaces_data - flag - hide detailed information on equipment interfaces
 is_hide_access_data - flag - hide information on equipment access parameters
 is_with_ip - flag - only with IP addresses
 node_id - infrastructure facility id (can be comma separated)
 object_id - id of the object to be selected

get_iface_info

Added with: 3.17dev1

Description: Get current interface information (directly from the device)
Required parameters:
 id - device id

get_iface_mac

Modified in 3.19beta1 (object_type parameter removed)

Added with: 3.12beta25

Description: List of interfaces with MAC addresses on the device
Required parameters:
 object_type - Device type [switch] (before version 3.19beta1)
 object_id - id of the device to be sampled

get_mac_list

Modified in 3.19beta1 (object_type parameter removed, object_id list made optional)

Description: Get a list of MAC addresses that were found on the device
Required parameters:
 object_type - Device type [switch] (before version 3.19beta1)
Optional parameters:
 interface_list - Interface number for which to output the list (can be comma separated)
 object_id - id of the device to be sampled

get_ont_data

Modified in: 3.16dev4 (added device_id parameter)

Added from: 3.12.81

Description: Get the latest information on ONU
Required parameters:
 id - MAC address or serial number (id)
 or
 device_id - device id (ONU)

get_pon_level_history

Modified in: 3.16.19 (added onu_device_id parameter)

Modified in: 3.16dev4 (added device_id parameter)

Modified in: 3.12.60 (added parameters limit, order_by, is_desc)

Added from: 3.12.53

Description: Get PON signal level history for an ONU
Required parameters:
 onu_name - MAC address or serial number of ONU (without separators)
 or
 device_id - device id (OLT)
 or
 onu_device_id - device id (ONU)
Optional parameters:
 limit - output data limit
 order_by - data sorting field
 is_desc - flag - sorting in reverse order

delete_mark

Modified in 3.19beta1 (object_type parameter removed)

Description: Remove a mark
Required parameters:
 object_type - Device type [switch] (before version 3.19beta1)
 object_id - device id
 mark_id - mark ID

read_fdb

Added in: 3.15.7

Description: Read FDB-table from device (may run for a long time)
Required parameters:
 device_id - device id

set_data

Modified in 3.19beta1 (object_type parameter removed)

Modified in 3.17dev1 (added possible value of date_last_activity to param)

Modified in 3.14.53 (added possible value of downlink_port, uplink_port to param)

Modified in 3.13.61 (added possible value of iface_count to param)

Modified in 3.12.74 (added possible value of comment to param)

Description: Change device information
Required parameters:
 object_type - Device type [switch] (before version 3.19beta1)
 object_id - device id
 param - type of parameter to change [ip|mac|comment|iface_count|downlink_port|uplink_port|date_last_activity]
 value - data (may be empty)

set_iface_state

Added with: 3.15beta3

Description: Change interface state on a device
Required parameters:
 device_id - device id
 iface - interface number
 state - state [1|0]

find_mac

Added in: 3.12beta25

Description: Search for a MAC address in equipment polling history
Required parameters:
 mac - MAC address (upper case without separators)

get_relation_customers

Added in: 3.19.45

Description: Retrieve information about dependent customers
Required parameters:
 device_id - device id
Optional parameters:
 port_start - starting port number
 port_finish - ending port number