API
Typical API request is SERVER_URL/api?cat=device&action=get_onu_info¶m=ZTEGC01234567
API support GET and POST requests
Of cource API support access key (key) what is optional (SERVER_URL/api?cat=device&action=get_onu_info¶m=ZTEGC01234567&key=AAAA)
|
Action
|
Required
|
Optional
|
Example
|
|---|---|---|---|
Category (cat) - db |
|||
| get_user_by_onu | param=ONU_NAME | /api?cat=db&action=get_user_by_onu¶m=ZTEGC01234567 | |
| get_user_by_mac | param=MAC | /api?cat=db&action=get_user_by_mac¶m=012345678911 | |
| get_user_by_login | param=LOGIN | /api?cat=db&action=get_user_by_login¶m=user | |
| availability Show list of device and ports with online status |
orderby = 'ip', 'hostname', 'monitoring_is_device_available' order = 'asc', 'desc' |
/api?cat=db&action=availability | |
| get_device_coordinates | |||
| onu_geo_list Show ONUs with geocoordinates, addresses and user |
param = 'critical', 'bad-signals' | ||
| get_device_by_ip | ip = IP | ||
| get_db_info_by_enterprise | enterprise = ENTERPRISE | ||
| cli_list Show CLI command alailable on this device |
ip = IP | ||
| get_mac_vendor Get information about vendor by MAC |
param=MAC | ||
| update_device_active_at_date | ip = IP | ||
| sfp_device_list List of devices what support SFP |
|||
| fdb_device_list List of devices what support getting FDB |
|||
| backups_device_list List of devices what support creating backups |
|||
| get_onu_list_by_ip Get ONUs list on OLT by IP |
ip = IP | ||
| get_onu_list_all Get all ONUs list |
|||
| get_onu_list_only Get ONUs list by param (category) |
param = 'critical', 'monitoring_enable', 'without_fob', 'without_fob_na', DEVICE_ID | ||
| get_last_registered_onu | |||
| update_onu_fob | param = ONU_NAME sub_param1 = FOB |
||
| get_pon_iface_onu_load Show PON ports load by ONU |
param = 'epon', 'gpon' | ||
| get_pon_iface_onu_load_by_olt_id Show PON ports load by ONU on OLT |
param = DEVICE_ID | ||
| get_sfp_power_history | param = DEVICE_ID port = PORT_NAME |
sub_param1 = DATE_FROM | |
| get_onu_history | param = ONU_NAME | sub_param1 = DATE_FROM | |
| get_device_types_list | |||
| get_device_list_short IP only |
|||
| get_device_list | param = DEVICE_TYPE (use get_device_types_list) | ||
| find_mac | param = MAC | deleted =0, 1 | |
| set_user_geo_by_login |
param=LOGIN lat=LAT lon=LON |
/api?cat=db&action=set_user_geo_by_login¶m=LOGIN&lat=LAT&lon=LON |
|
| get_unregistered_onu |
Info from db |
||
| get_unregistered_onu_scan |
Info from db after searching |
||
| get_unregistered_onu_param |
|||
| get_unregistered_onu_reg_template |
|||
Events
|
|||
| get_gevent_alarm | /api?cat=db&action=get_gevent_alarm | ||
|
get_gevents Event types |
All active events |
event_type_id | /api?cat=db&action=get_gevents |
|
get_gevents Events by type, id and other |
id = EVENT ID or ip = DEVICE IP or param = BY FIELD ("device_id", "port_id", "onu_name_id", "sfp_id", "closed_by_id", "confirmed_by_id", "event_id") - ID required |
history = 2 - active + history event_type_id |
/api?cat=db&action=get_gevents&id=109055 /api?cat=db&action=get_gevents¶m=onu_name_id&id=126001&history=2 |
Category (cat) - device |
|||
| get_port_status | ip= IP port = PORT_NAME |
||
| get_snmp_uptime get_snmp_hostname get_snmp_description get_snmp_enterprise check_available check_ip device_versions get_device_sys_info get_device_port_status_only get_device_load |
ip = IP | ||
| get_ports get_pon_ports |
ip = IP |
param = PORT_INDEX sub_param1 = 1, 0 (full or short info) |
|
| get_ports_short get_pon_ports_short |
ip = IP param = PORT_INDEX |
||
| get_port_list | ip = IP | ||
| check_device_in_db | ip = IP hostname = HOSTNAME enterprise = ENTERPRISE |
||
| get_zte_olt_cards | |||
| olt_list | |||
| get_onus_state_on_interface | ip = IP | param = PORT_NAME | |
| get_onu_monitoring Check ONU online |
param = ONU_NAME | ||
| get_onu_info_offline get_onu_info_history Get latest ONU info from database |
param = ONU_NAME | ||
| get_onu_info Get ONU info from OLT |
param = ONU_NAME | ||
| get_onu_speed | param = ONU_NAME sub_param1 = 1, 0 (show traffic) id = ONU_ID |
||
| onu_list_on_olt |
ip = IP | param = PORT_INDEX | |
| get_sfp_power get_fdb get_arp_table get_all_device_ports_states get_vlans get_vlans_list_to_db |
ip = IP | ||
| get_iferror | ip = IP | save = 1, 0 | |
| do_backup get_device_list_for_do_backup get_remote_backup_file_list |
ip = IP | ||
Category (cat) - runThis is command for run work with devices |
|||
| run_device_monitoring run_port_monitoring run_onu_monitoring run_device_discovery run_sfp_power_discovery run_onu_discovery run_fdb_discovery run_device_backups |
|||
| run_onu_signals_discovery | param = 'critical' | ||
Category (cat) - system |
|||
| ping nmap traceroute |
ip = IP | ||
| get_notify_list_last Get list of notify on last 3 hour |
|||
| get_notify_to_do Get list of unsended messages |
|||
| send_notify Send message from list |
id = NOTIFY_ID | ||
| get_log_type | |||
| delete_expiration_days Clean database from old data |
|||
Category (cat) - reports |
|||
| main_report sfp_report |
|||
Category (cat) - 3rdparty |
|||
| ips Get list of generator and UPS |
|||
| get_user_list_in_db Get all users |
|||
| get_user_by_id | param = USER_ID | ||
| get_user_by_username | param = USER_LOGIN | ||
| zabbix_find_freeport | ip = IP | ||
| us_vols_list | |||
| get_us_vols_nodes_list_from_us Get and save commutation from Userside |
|||
| us_commutation | param = US_NODE_TYPE | ||
| us_get_vehicle Get GPS from Userside |
|||
Category (cat) - billing |
|||
| update_region Create or update region data |
id = REGION_ID title = REGION_NAME |
If no id or no data in database - new region will created |
|
| update_district Create or update district data |
id = DISTRICT_ID region_id = REGION_ID title = DISTRICT_NAME |
If no id or no data in database - new district will created |
|
| update_сity Create or update city data |
id = CITY_ID district_id = DISTRICT_ID title = CITY_NAME |
If no id or no data in database - new city will created |
|
| update_street Create or update street data |
id = STREET_ID city_id = CITY_ID title = STREET_NAME |
If no id or no data in database - new street will created |
|
| update_building Create or update street data |
id = BUILDING_ID title = BUILDING_NAME street_id = STREET_ID |
If no id or no data in database - new building will created Optional data: description, entrances_count, floors_count, lat, lon |
|
| update_user Create or update user data |
id = USER_ID |
If no id or no data in database - new user will created Optional data: building_id, login, user_name, mac, onu_name, ip, is_business, apartment, entrance, floor, money, status, lat, lon, address. If no address - it will autogenerated by building_id |
|