API Reference
OpenNMS
Bases: PaginationMixin, InfoMixin, AlarmsMixin, AlarmStatsMixin, AlarmHistoryMixin, EventsMixin, NodesMixin, OutagesMixin, NotificationsMixin, AcksMixin, RequisitionsMixin, ForeignSourcesMixin, SnmpConfigMixin, GroupsMixin, UsersMixin, CategoriesMixin, SchedOutagesMixin, KscReportsMixin, ResourcesMixin, MeasurementsMixin, HeatmapMixin, MapsMixin, GraphsMixin, FlowsMixin, DeviceConfigMixin, SituationsMixin, BusinessServicesMixin, MetadataMixin, DiscoveryMixin, IpInterfacesV2Mixin, SnmpInterfacesV2Mixin, EnLinkdMixin, MonitoringLocationsMixin, MinionsMixin, IfServicesMixin, AvailabilityMixin, HealthMixin, WhoamiMixin, ClassificationsMixin, SituationFeedbackMixin, UserDefinedLinksMixin, ApplicationsMixin, PerspectivePollerMixin, ForeignSourcesConfigMixin, RequisitionNamesMixin, SnmpMetadataMixin, ProvisiondMixin, EventConfMixin, MonitoringSystemsMixin, AssetSuggestionsMixin, ScvMixin, ConfigMgmtMixin, SnmpTrapNbiMixin, EmailNbiMixin, SyslogNbiMixin, JavamailConfigMixin
Thin Python wrapper for the OpenNMS REST API.
All responses are returned as parsed Python objects (dicts/lists/ints).
Failed HTTP requests raise :class:~opennms_api_wrapper.OpenNMSHTTPError
(or a specific subclass such as :class:~opennms_api_wrapper.NotFoundError).
Usage::
import opennms_api_wrapper as opennms
client = opennms.OpenNMS(
url="http://localhost:8980",
username="admin",
password="admin",
)
# Get all critical alarms
alarms = client.get_alarms(limit=0, severity="CRITICAL")
# Acknowledge an alarm
client.ack_alarm(42)
# List nodes
nodes = client.get_nodes(limit=25)
# Create a requisition node
client.create_requisition_node("Servers", {
"foreign-id": "web01",
"node-label": "web01.example.com",
"interface": [
{
"ip-addr": "10.0.0.1",
"snmp-primary": "P",
"status": 1,
"monitored-service": [{"service-name": "ICMP"}, {"service-name": "HTTP"}],
}
],
})
client.import_requisition("Servers")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
Base URL of the OpenNMS instance, e.g. |
required |
username
|
str
|
OpenNMS username (needs at minimum the |
required |
password
|
str
|
OpenNMS password. |
required |
verify_ssl
|
bool
|
Whether to verify SSL certificates. Set to |
True
|
timeout
|
int
|
Socket timeout in seconds for all HTTP requests.
Defaults to |
30
|
retries
|
int
|
Number of retries on connection errors and HTTP
500/502/503/504 with exponential backoff (0.5 s factor).
Defaults to |
3
|
accept_situation(situation_id)
Accept (acknowledge) a situation.
ack_alarm(alarm_id, ack_user=None)
Acknowledge alarm alarm_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ack_user
|
Optional[str]
|
Acknowledge on behalf of this user (requires admin role). |
None
|
ack_event(event_id)
Acknowledge event event_id.
ack_notification(notification_id)
Acknowledge notification notification_id.
add_alarms_to_situation(situation_id, alarm_ids, feedback=None)
Link additional alarm IDs to an existing situation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
situation_id
|
int
|
Target situation ID. |
required |
alarm_ids
|
list
|
List of integer alarm IDs to associate. |
required |
feedback
|
Optional[str]
|
Optional feedback string. |
None
|
add_category_to_group(group_name, category_name)
Associate category_name with group_name.
add_child_edge(service_id, edge)
Add a child-service edge to a business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
int
|
Database ID of the business service. |
required |
edge
|
BsChildEdge
|
Edge definition dict with keys such as |
required |
add_foreign_source_detector(name, detector)
Add a detector to foreign source name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name. |
required |
detector
|
ForeignSourceDetector
|
Detector definition dict. Example:
|
required |
add_foreign_source_policy(name, policy)
Add a policy to foreign source name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name. |
required |
policy
|
ForeignSourcePolicy
|
Policy definition dict. Example:: { "name": "Do Not Persist Discovered IPs", "class": "org.opennms.netmgt.provision.persist.policies.MatchingIpInterfacePolicy", "parameter": [{"key": "action", "value": "DO_NOT_PERSIST"}], } |
required |
add_ip_service_edge(service_id, edge)
Add an IP-service edge to a business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
int
|
Database ID of the business service. |
required |
edge
|
BsIpServiceEdge
|
Edge definition dict with keys such as |
required |
add_node_category(node_id, category)
Add a category to node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
category
|
dict
|
Category dict. Example: |
required |
add_node_hardware_inventory(node_id, data)
Add a hardware inventory entry to node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
data
|
HardwareEntity
|
Hardware inventory entity dict. |
required |
add_reduction_key_edge(service_id, edge)
Add a reduction-key edge to a business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
int
|
Database ID of the business service. |
required |
edge
|
BsReductionKeyEdge
|
Edge definition dict with keys such as |
required |
add_requisition_node_category(name, foreign_id, category)
Add or replace a category on a requisition node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node. |
required |
category
|
dict
|
Category dict. Example: |
required |
add_user_to_group(group_name, username)
Add username to group_name.
assign_role_to_user(username, role_name)
Assign role_name to username.
associate_category_with_group(category, group)
Associate category with user group group.
associate_category_with_node(category, node_id)
Associate category with node_id.
associate_sched_outage_collectd(outage_name, package)
Associate outage outage_name with collectd package.
associate_sched_outage_notifd(outage_name)
Associate outage outage_name with the notifications daemon.
associate_sched_outage_pollerd(outage_name, package)
Associate outage outage_name with pollerd package.
associate_sched_outage_threshd(outage_name, package)
Associate outage outage_name with threshd package.
backup_device_config(backups)
Trigger a backup retrieval for one or more interfaces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backups
|
list
|
List of backup request dicts. Each dict has keys:
|
required |
bulk_ack_alarms(**filters)
Acknowledge all alarms matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
bulk_ack_events(**filters)
Acknowledge all events matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
bulk_clear_alarms(**filters)
Clear all alarms matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
bulk_escalate_alarms(**filters)
Escalate all alarms matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
bulk_unack_alarms(**filters)
Remove acknowledgement from all alarms matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
bulk_unack_events(**filters)
Remove acknowledgement from all events matching the given filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
classify(request)
Classify a flow record against the configured rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ClassifyRequest
|
Classification request dict with keys such as
|
required |
clear_alarm(alarm_id)
Clear alarm alarm_id (sets severity to CLEARED).
clear_situation(situation_id)
Clear a situation by ID.
clear_situation_alarms(situation_id, alarm_ids)
Remove alarm_ids from a situation and clear them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
situation_id
|
int
|
Target situation ID. |
required |
alarm_ids
|
list
|
List of integer alarm IDs to remove and clear. |
required |
create_ack(action, alarm_id=None, notification_id=None)
Create or modify an acknowledgement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
str
|
One of |
required |
alarm_id
|
Optional[int]
|
Target alarm ID (mutually exclusive with notification_id). |
None
|
notification_id
|
Optional[int]
|
Target notification ID. |
None
|
create_application(app)
Create a new application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Application
|
Application definition dict with keys such as |
required |
create_business_service(service)
Create a new business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service
|
BusinessService
|
Business service definition dict. Common keys:
|
required |
create_category(category)
Add a new surveillance category.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
Category
|
Category dict. Example:
|
required |
create_classification_group(group)
Create a new classification group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
ClassificationGroup
|
Group definition dict with key |
required |
create_classification_rule(rule)
Create a new classification rule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule
|
ClassificationRule
|
Rule definition dict. Common keys: |
required |
create_config(name, config_id, data)
Create a new configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
data
|
dict
|
Configuration data dict. |
required |
create_credential(data)
Create a new credential entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Credential
|
Credential definition dict with keys |
required |
create_email_nbi_destination(data)
Create a new email NBI destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
EmailNbiDestination
|
Destination definition dict with keys such as |
required |
create_event(event)
Publish an event to the OpenNMS event bus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Event
|
Event dict matching the OpenNMS event schema. |
required |
Example
client.create_event({ "uei": "uei.opennms.org/internal/test", "source": "my-script", "severity": "Normal", "nodeId": 1, "interface": "192.168.0.1", "parms": { "parm": [ {"parmName": "key", "value": {"content": "val"}} ] } })
create_eventconf_event(source_id, event)
Create a new event definition in a source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
event
|
EventConfEvent
|
Event definition dict. |
required |
create_foreign_source(foreign_source)
Create a new foreign source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
foreign_source
|
ForeignSource
|
Foreign source definition dict. Example:: { "name": "Servers", "scan-interval": "1d", "detectors": [ { "name": "ICMP", "class": "org.opennms.netmgt.provision.detector.icmp.IcmpDetector", "parameter": [], }, { "name": "SNMP", "class": "org.opennms.netmgt.provision.detector.snmp.SnmpDetector", "parameter": [], }, ], "policies": [], } |
required |
create_group(group)
Create a new user group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
Group
|
Group definition dict. Example:
|
required |
create_javamail_end2end(data)
Create a new end-to-end mail test configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
JavamailEnd2End
|
End-to-end configuration dict. |
required |
create_javamail_readmail(data)
Create a new read-mail configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
JavamailReadmail
|
Read-mail configuration dict. |
required |
create_javamail_sendmail(data)
Create a new send-mail configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
JavamailSendmail
|
Send-mail configuration dict. |
required |
create_ksc_report(report)
Create a new KSC report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
KscReport
|
KSC report definition dict. Example:: { "id": 0, "label": "My Bandwidth Report", "show_timespan_button": False, "show_graphtype_button": False, "graphs_per_line": 1, "graphs": [ { "title": "Core Switch Bandwidth", "resourceId": "node[1].interfaceSnmp[eth0-04013f75f101]", "timespan": "7_day", "graphtype": "mib2.bits", } ], } |
required |
create_map(map_data)
create_monitoring_location(location)
Create a new monitoring location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
MonitoringLocation
|
Monitoring location definition. See
:class: |
required |
create_node(node)
Create a node via the v1 API (POST /rest/nodes).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node
|
Node
|
Node attribute dict. Common keys:
|
required |
Note: The OpenNMS v1 nodes endpoint traditionally required XML.
Modern Horizon releases (30+) accept JSON. If your server returns
415, use the requisitions API instead (create_requisition_node()).
create_node_ip_interface(node_id, interface)
Add an IP interface to node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
interface
|
NodeIpInterface
|
Interface dict. Example:: {"ipAddress": "192.168.0.1", "snmpPrimary": "P", "isManaged": "M"} |
required |
create_node_ip_service(node_id, ip_address, service)
Add a monitored service to ip_address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_address
|
str
|
IP address of the interface. |
required |
service
|
dict
|
Service dict. Example: |
required |
create_node_snmp_interface(node_id, interface)
Add an SNMP interface to node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
interface
|
NodeSnmpInterface
|
SNMP interface attribute dict. |
required |
create_requisition(requisition)
Add or replace a requisition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
requisition
|
Requisition
|
Requisition dict. Must contain at least
|
required |
create_requisition_node(name, node)
Add or replace a node in requisition name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
node
|
RequisitionNode
|
Node definition. See
:class: |
required |
create_requisition_node_interface(name, foreign_id, interface)
Add or replace an interface on a requisition node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node. |
required |
interface
|
dict
|
Interface dict with keys such as |
required |
create_requisition_node_service(name, foreign_id, ip_address, service)
Add or replace a service on a requisition node interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node. |
required |
ip_address
|
str
|
IP address of the interface. |
required |
service
|
dict
|
Service dict. Example: |
required |
create_sched_outage(outage)
Add a new (or replace an existing) scheduled outage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outage
|
SchedOutage
|
Scheduled outage definition dict. Valid
|
required |
create_situation(alarm_ids, description=None, diagnostic_text=None)
Create a new situation from a list of alarm IDs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alarm_ids
|
list
|
List of integer alarm IDs. |
required |
description
|
Optional[str]
|
Optional situation description. |
None
|
diagnostic_text
|
Optional[str]
|
Optional diagnostic text. |
None
|
create_snmptrap_nbi_trapsink(data)
Create a new SNMP trap NBI trap sink.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
SnmpTrapNbiTrapSink
|
Trap sink definition dict with keys such as |
required |
create_syslog_nbi_destination(data)
Create a new syslog NBI destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
SyslogNbiDestination
|
Destination definition dict with keys such as |
required |
create_user(user, hash_password=False)
Create a new user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
User
|
User attribute dict. Required key:
|
required |
hash_password
|
bool
|
When |
False
|
create_user_defined_link(link)
Create a new user-defined link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
link
|
UserDefinedLink
|
Link definition dict with keys such as |
required |
delete_application(app_id)
Delete an application.
delete_business_service(service_id)
Delete a business service.
delete_category(category)
Delete a category.
delete_classification_group(group_id)
Delete a classification group.
delete_classification_rule(rule_id)
Delete a specific classification rule.
delete_classification_rules(group_id=None)
Delete classification rules, optionally filtered by group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
Optional[int]
|
When provided, delete only rules in this group. |
None
|
delete_config(name, config_id)
Delete a configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
delete_config_part(name, config_id, path)
Delete a sub-part of a configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
path
|
str
|
Sub-path within the configuration. |
required |
delete_credential(alias)
Delete a credential.
delete_deployed_requisition(name)
Delete a deployed requisition.
delete_email_nbi_destination(name)
Delete an email NBI destination.
delete_eventconf_events(source_id, payload)
Delete events from a source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
payload
|
dict
|
Dict or list identifying events to delete. |
required |
delete_eventconf_sources(payload)
Delete event configuration sources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict
|
Dict or list identifying sources to delete. |
required |
delete_foreign_source(name)
Delete a foreign source.
delete_foreign_source_detector(name, detector)
Remove a detector from foreign source name.
delete_foreign_source_policy(name, policy)
Remove a policy from foreign source name.
delete_group(group_name)
Delete a user group.
delete_interface_metadata_context(node_id, ip_interface, context)
Delete all metadata in context for the given interface.
delete_interface_metadata_key(node_id, ip_interface, context, key)
Delete a specific metadata key for the given interface.
delete_javamail_end2end(name)
Delete an end-to-end mail test configuration.
delete_javamail_readmail(name)
Delete a read-mail configuration.
delete_javamail_sendmail(name)
Delete a send-mail configuration.
delete_map(map_id)
Delete a map.
delete_monitoring_location(name)
Delete a monitoring location.
delete_node(node_id)
Delete a node (async – returns 202 Accepted).
delete_node_category(node_id, category)
Remove a category from node_id (sync – returns 204).
delete_node_hardware_entity(node_id, ent_physical_index)
Delete a specific hardware entity.
delete_node_ip_interface(node_id, ip_address)
Delete an IP interface (async – returns 202 Accepted).
delete_node_ip_service(node_id, ip_address, service)
Delete a monitored service (async – returns 202 Accepted).
delete_node_metadata_context(node_id, context)
Delete all metadata in context for node_id.
delete_node_metadata_key(node_id, context, key)
Delete a specific metadata key for node_id.
delete_node_snmp_interface(node_id, ifindex)
Delete an SNMP interface (sync – returns 204).
delete_requisition(name)
Delete a pending (not yet deployed) requisition.
delete_requisition_node(name, foreign_id)
Delete a node from requisition name (async – returns 202).
delete_requisition_node_asset(name, foreign_id, field)
Delete an asset field from a requisition node (async).
delete_requisition_node_category(name, foreign_id, category)
Delete a category from a requisition node (async).
delete_requisition_node_interface(name, foreign_id, ip_address)
Delete an interface from a requisition node (async).
delete_requisition_node_service(name, foreign_id, ip_address, service_name)
Delete a service from a requisition node interface (async).
delete_resource(resource_id)
Delete a resource and all its child resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
Resource ID string (see |
required |
delete_sched_outage(outage_name)
Delete a scheduled outage.
delete_service_metadata_context(node_id, ip_interface, service, context)
Delete all metadata in context for the given service.
delete_service_metadata_key(node_id, ip_interface, service, context, key)
Delete a specific metadata key for the given service.
delete_snmptrap_nbi_trapsink(name)
Delete a trap sink.
delete_syslog_nbi_destination(name)
Delete a syslog NBI destination.
delete_user(username)
Delete a user.
delete_user_defined_link(link_id)
Delete a user-defined link.
discover(config)
Submit a one-time discovery scan configuration (v2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict
|
Discovery configuration dict. Supported keys (all lists default to empty):
|
required |
Note: The v2 discovery endpoint is documented as XML-only. This
method sends JSON; if your OpenNMS version rejects it with HTTP 415
please open an issue — the workaround is to submit the request
manually with an XML body matching the discovery-configuration
schema.
Example::
client.discover({
"specifics": [
{"ip": "10.0.0.1", "location": "Default", "foreignSource": "Routers"}
],
"include_ranges": [
{"begin": "10.0.1.1", "end": "10.0.1.254"}
],
})
dissociate_category_from_group(category, group)
Remove category from user group group.
dissociate_category_from_node(category, node_id)
Remove category from node_id.
dissociate_sched_outage_collectd(outage_name, package)
Remove collectd package association from outage_name.
dissociate_sched_outage_notifd(outage_name)
Remove notifications daemon association from outage_name.
dissociate_sched_outage_pollerd(outage_name, package)
Remove pollerd package association from outage_name.
dissociate_sched_outage_threshd(outage_name, package)
Remove threshd package association from outage_name.
download_device_configs(config_ids)
Download configs for one or more config_ids.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_ids
|
list
|
List of integer config IDs to download. |
required |
download_eventconf_events(source_id)
Download events for a source as raw XML text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
Returns:
| Type | Description |
|---|---|
|
Raw response text (typically XML). |
escalate_alarm(alarm_id)
Escalate the severity of alarm alarm_id by one step.
get_ack(ack_id)
Return the acknowledgement with the given ID.
get_ack_count()
Return the total number of acknowledgements.
get_acks(limit=10, offset=0, **filters)
List acknowledgements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_alarm(alarm_id)
Return the alarm with the given ID.
get_alarm_count()
Return the total number of alarms.
get_alarm_history(at=None)
Return last known state of all active alarms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
at
|
Optional[int]
|
Optional millisecond epoch timestamp for historical lookup. |
None
|
get_alarm_history_at(alarm_id, at=None)
Return final known state of alarm_id (optionally at a point in time).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alarm_id
|
int
|
The alarm database ID. |
required |
at
|
Optional[int]
|
Optional millisecond epoch timestamp. |
None
|
get_alarm_history_states(alarm_id)
Return all state transitions for alarm_id.
get_alarm_stats(**filters)
Return alarm statistics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_alarm_stats_by_severity(severities=None)
Return alarm statistics grouped by severity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
severities
|
Optional[list]
|
Optional list of severity strings to include,
e.g. |
None
|
get_alarm_v2(alarm_id)
Return a single alarm by ID using the v2 API.
get_alarms(limit=10, offset=0, order_by=None, order=None, **filters)
List alarms (v1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
**filters
|
Additional Hibernate query filters passed directly as
query parameters (e.g. |
{}
|
get_alarms_v2(fiql=None, limit=10, offset=0, order_by=None, order=None)
List alarms using the v2 API with optional FIQL filter string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fiql
|
Optional[str]
|
FIQL filter string (e.g. |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
Example::
client.get_alarms_v2(fiql="alarm.severity==MAJOR")
get_application(app_id)
Get a specific application by app_id.
get_applications(limit=10, offset=0)
List all applications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Maximum number of results. |
10
|
offset
|
int
|
Number of results to skip. |
0
|
get_asset_suggestions()
Get asset field suggestions based on existing inventory data.
get_availability()
Get availability summary for all categories.
get_availability_category(category)
Get availability summary for a specific category.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
str
|
Surveillance category name. |
required |
get_availability_category_node(category, node_id)
Get availability for a specific node within a category.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
str
|
Surveillance category name. |
required |
node_id
|
int
|
Node database ID. |
required |
get_availability_category_nodes(category)
Get per-node availability for a specific category.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
str
|
Surveillance category name. |
required |
get_availability_node(node_id)
Get availability summary for a specific node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
int
|
Node database ID. |
required |
get_business_service(service_id)
Get a specific business service by service_id.
get_business_service_edge(edge_id)
Get a specific business service edge by edge_id.
get_business_services()
List all business services.
get_categories()
List all configured surveillance categories.
get_categories_for_group(group)
Get categories associated with user group group.
get_category(category)
Get a specific category by category name.
get_category_for_node(category, node_id)
Get a specific category for node_id.
get_classification_group(group_id)
Get a specific classification group by group_id.
get_classification_groups(limit=10, offset=0)
List classification groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Maximum number of results. |
10
|
offset
|
int
|
Number of results to skip. |
0
|
get_classification_protocols()
List all known protocols used by the classification engine.
get_classification_rule(rule_id)
Get a specific classification rule by rule_id.
get_classification_rules(limit=10, offset=0)
List classification rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Maximum number of results. |
10
|
offset
|
int
|
Number of results to skip. |
0
|
get_config(name, config_id)
Get a specific configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
get_config_ids(name)
List configuration IDs for a given configuration name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
get_config_names()
List all configuration names.
get_config_part(name, config_id, path)
Get a sub-part of a configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
path
|
str
|
Sub-path within the configuration. |
required |
get_config_schema(name)
Get the schema for a specific configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
get_config_schemas()
List all configuration schemas.
get_credential(alias)
Get a specific credential by alias.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
Credential alias (unique key). |
required |
get_credentials()
List all stored credentials.
get_default_foreign_source()
Get the default foreign source definition.
get_default_monitoring_location()
Get the default monitoring location.
get_deployed_foreign_source_count()
Return the count of deployed foreign sources.
get_deployed_foreign_sources()
List all deployed foreign sources.
get_deployed_requisition_count()
Return the count of deployed requisitions.
get_deployed_requisitions()
List all deployed requisitions.
get_device_config(config_id)
Get device configuration for a specific database config_id.
get_device_config_by_interface(interface_id)
Get all configs for a specific interface_id.
get_device_configs(limit=10, offset=0, order_by=None, order=None, device_name=None, ip_address=None, config_type=None, created_after=None, created_before=None)
List all device configurations (sorted by lastUpdated by default).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
device_name
|
Optional[str]
|
Filter by device hostname. |
None
|
ip_address
|
Optional[str]
|
Filter by IP address. |
None
|
config_type
|
Optional[str]
|
Filter by config type string. |
None
|
created_after
|
Optional[int]
|
Filter to configs created after this ms epoch. |
None
|
created_before
|
Optional[int]
|
Filter to configs created before this ms epoch. |
None
|
get_email_nbi_config()
Get the full email NBI configuration.
get_email_nbi_destination(name)
Get a specific email destination by name.
get_email_nbi_destinations()
List all email NBI destinations.
get_email_nbi_status()
Get the email NBI forwarding status.
get_event(event_id)
Return the event with the given ID.
get_event_count()
Return the total number of events.
get_eventconf_filter(uei=None, vendor=None, **kwargs)
Get event configuration with optional filtering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uei
|
Optional[str]
|
Optional UEI pattern to filter by. |
None
|
vendor
|
Optional[str]
|
Optional vendor name to filter by. |
None
|
**kwargs
|
Additional query parameters. |
{}
|
get_eventconf_filter_events(source_id, **kwargs)
Get events for a specific configuration source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
**kwargs
|
Additional query parameters. |
{}
|
get_eventconf_filter_sources(filter=None, **kwargs)
Get event configuration sources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter
|
Optional[str]
|
Optional filter expression. |
None
|
**kwargs
|
Additional query parameters. |
{}
|
get_eventconf_source(source_id)
Get a specific event configuration source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
get_eventconf_source_names()
List all event configuration source names.
get_eventconf_vendor_events(vendor_name)
Get events for a specific vendor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vendor_name
|
str
|
Vendor name. |
required |
get_events(limit=10, offset=0, order_by=None, order=None, **filters)
List events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_flow_applications(top_n=10, start=-14400000, end=0, if_index=None, exporter_node=None, include_other=False)
Return traffic stats for the top top_n applications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top applications to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria (DB ID or
|
None
|
include_other
|
bool
|
When |
False
|
get_flow_applications_enumerate(start=-14400000, end=0, if_index=None, exporter_node=None, limit=10)
List application names that have flows in the given time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
get_flow_applications_series(top_n=10, start=-14400000, end=0, step=300000, if_index=None, exporter_node=None, include_other=False)
Return time-series data for the top top_n applications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top applications to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
step
|
int
|
Requested interval between data points in ms (default 5 min). |
300000
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_conversations(top_n=10, start=-14400000, end=0, if_index=None, exporter_node=None, include_other=False)
Return traffic stats for the top top_n conversations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top conversations to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_conversations_enumerate(start=-14400000, end=0, if_index=None, exporter_node=None, limit=10)
List conversations that have flows in the given time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
get_flow_conversations_series(top_n=10, start=-14400000, end=0, step=300000, if_index=None, exporter_node=None, include_other=False)
Return time-series data for the top top_n conversations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top conversations to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
step
|
int
|
Requested interval between data points in ms (default 5 min). |
300000
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_count()
Return the number of flows available.
get_flow_dscp(top_n=10, start=-14400000, end=0, if_index=None, exporter_node=None, include_other=False)
Return traffic stats for the top top_n DSCP values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top DSCP values to return. |
10
|
start
|
int
|
Start time in ms since epoch (negative = relative to end). |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_dscp_enumerate(start=-14400000, end=0, if_index=None, exporter_node=None, limit=10)
List DSCP values that have flows in the given time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
int
|
Start time in ms since epoch (negative = relative to end). |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
get_flow_dscp_series(top_n=10, start=-14400000, end=0, step=300000, if_index=None, exporter_node=None, include_other=False)
Return time-series data for the top top_n DSCP values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top DSCP values to return. |
10
|
start
|
int
|
Start time in ms since epoch (negative = relative to end). |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
step
|
int
|
Interval between data points in ms (default 5 min). |
300000
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_exporter(node_criteria)
Return details about a specific flow exporter node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
str
|
Node DB ID or |
required |
get_flow_exporters()
Return basic information for all exporter nodes that have flows.
get_flow_graph_url()
Return the configured flow graph URL.
get_flow_hosts(top_n=10, start=-14400000, end=0, if_index=None, exporter_node=None, include_other=False)
Return traffic stats for the top top_n hosts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top hosts to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_flow_hosts_enumerate(start=-14400000, end=0, if_index=None, exporter_node=None, limit=10)
List hosts that have flows in the given time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
get_flow_hosts_series(top_n=10, start=-14400000, end=0, step=300000, if_index=None, exporter_node=None, include_other=False)
Return time-series data for the top top_n hosts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
top_n
|
int
|
Number of top hosts to return. |
10
|
start
|
int
|
Start time in ms since epoch. Negative values are relative
to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
step
|
int
|
Requested interval between data points in ms (default 5 min). |
300000
|
if_index
|
Optional[int]
|
Optional SNMP ifIndex to filter by interface. |
None
|
exporter_node
|
Optional[str]
|
Optional node criteria to filter by exporter. |
None
|
include_other
|
bool
|
When |
False
|
get_foreign_source(name)
Get a specific foreign source by name.
get_foreign_source_config_assets()
List available asset fields.
get_foreign_source_config_categories()
List available surveillance categories.
get_foreign_source_config_detectors()
List available service detectors.
get_foreign_source_config_policies()
List available provisioning policies.
get_foreign_source_config_services(group_name)
List services available for a given provisioning group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_name
|
str
|
Foreign source / provisioning group name. |
required |
get_foreign_source_detector(name, detector)
Get a specific detector from foreign source name.
get_foreign_source_detectors(name)
List detectors for foreign source name.
get_foreign_source_policies(name)
List policies for foreign source name.
get_foreign_source_policy(name, policy)
Get a specific policy from foreign source name.
get_foreign_sources()
List all active (pending + deployed) foreign sources.
get_graph(container_id, namespace)
Get a graph by namespace from container_id.
get_graph_container(container_id)
Get a specific graph container by container_id.
get_graph_containers()
List all registered graph containers and their metadata.
get_graph_search_results(namespace, provider_id=None, criteria=None, context=None)
Return search results for graph elements in namespace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
namespace
|
str
|
Graph namespace to search within. |
required |
provider_id
|
Optional[str]
|
Optional search provider ID to restrict results. |
None
|
criteria
|
Optional[str]
|
Optional search criteria string. |
None
|
context
|
Optional[str]
|
Optional context string passed to the search provider. |
None
|
get_graph_search_suggestions(namespace, search_term)
Return search suggestions for graph elements in namespace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
namespace
|
str
|
Graph namespace to search within. |
required |
search_term
|
str
|
Partial string to match against graph element labels. |
required |
get_graph_view(container_id, namespace, semantic_zoom_level=1, vertices_in_focus=None)
Get a focused graph view via POST.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
container_id
|
str
|
Graph container ID. |
required |
namespace
|
str
|
Graph namespace. |
required |
semantic_zoom_level
|
int
|
SZL (default 1). |
1
|
vertices_in_focus
|
Optional[list]
|
List of vertex ID strings in the form
|
None
|
get_group(group_name)
Get a specific group by group_name.
get_group_categories(group_name)
List surveillance categories associated with group_name.
get_group_users(group_name)
List users in group_name.
get_groups()
List all user groups.
get_health(tag=None)
Get the health status of the OpenNMS instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
Optional[str]
|
Optional tag to filter health checks. |
None
|
get_health_probe()
Get a simple health probe (up/down) response.
get_heatmap_alarms_categories()
Return alarm heatmap data grouped by category.
get_heatmap_alarms_foreign_sources()
Return alarm heatmap data grouped by foreign source.
get_heatmap_alarms_monitored_services()
Return alarm heatmap data grouped by monitored service.
get_heatmap_alarms_nodes_by_category(category)
Return alarm heatmap node data for category.
get_heatmap_alarms_nodes_by_foreign_source(foreign_source)
Return alarm heatmap node data for foreign_source.
get_heatmap_alarms_nodes_by_service(service)
Return alarm heatmap node data for monitored service.
get_heatmap_outages_categories()
Return outage heatmap data grouped by category.
get_heatmap_outages_foreign_sources()
Return outage heatmap data grouped by foreign source.
get_heatmap_outages_monitored_services()
Return outage heatmap data grouped by monitored service.
get_heatmap_outages_nodes_by_category(category)
Return outage heatmap node data for category.
get_heatmap_outages_nodes_by_foreign_source(foreign_source)
Return outage heatmap node data for foreign_source.
get_heatmap_outages_nodes_by_service(service)
Return outage heatmap node data for monitored service.
get_ifservices(**kwargs)
List monitored services with optional query parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Query parameters such as |
{}
|
get_ifservices_v2(fiql=None, limit=10, offset=0)
List monitored services via the v2 API with FIQL filtering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fiql
|
Optional[str]
|
FIQL filter expression. |
None
|
limit
|
int
|
Maximum number of results. |
10
|
offset
|
int
|
Number of results to skip. |
0
|
get_info()
Return OpenNMS server version, package info, and running services.
Example response keys: displayVersion, version,
packageName, packageDescription, ticketerConfig,
datetimeformatConfig, services.
get_interface_metadata(node_id, ip_interface)
Get all metadata for the interface ip_interface on node_id.
get_interface_metadata_context(node_id, ip_interface, context)
Get metadata within context for the given interface.
get_interface_metadata_value(node_id, ip_interface, context, key)
Get a specific metadata value for the given interface.
get_ip_interfaces(fiql=None, limit=10, offset=0)
List IP interfaces using the v2 API with optional FIQL filtering.
This is a global (cross-node) read-only view. For write operations
use create_node_ip_interface() / delete_node_ip_interface().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fiql
|
Optional[str]
|
FIQL filter string. Examples: |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
get_javamail_default_config()
Get the default Javamail configuration.
get_javamail_end2end(name)
Get a specific end-to-end mail test configuration by name.
get_javamail_end2ends()
List all end-to-end mail test configurations.
get_javamail_readmail(name)
Get a specific read-mail configuration by name.
get_javamail_readmails()
List all read-mail configurations.
get_javamail_sendmail(name)
Get a specific send-mail configuration by name.
get_javamail_sendmails()
List all send-mail configurations.
get_ksc_report(report_id)
Get a specific KSC report by report_id.
get_ksc_report_count()
Return the total number of KSC reports.
get_ksc_reports()
List all KSC reports (returns ID and label for each).
get_latest_device_configs(limit=10, offset=0, order_by=None, order=None, search=None, status=None)
Return the latest config for all devices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
search
|
Optional[str]
|
Search term for device name / IP. |
None
|
status
|
Optional[str]
|
Filter by backup status. |
None
|
get_map(map_id)
Get a specific map by map_id.
get_map_elements(map_id)
Get nodes, links, and elements for map map_id.
get_map_function(name)
Get a specific map function by name.
get_map_functions()
List all available map functions.
get_maps()
List all maps.
get_measurements(resource_id, attribute, start=-14400000, end=0, step=300000, max_rows=0, aggregation='AVERAGE', fallback_attribute=None)
Retrieve time-series values for a single attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
OpenNMS resource ID string, e.g.
|
required |
attribute
|
str
|
RRD attribute name, e.g. |
required |
start
|
int
|
Start time in milliseconds since epoch. Negative values
are relative to end (default |
-14400000
|
end
|
int
|
End time in ms since epoch. |
0
|
step
|
int
|
Requested interval between rows in ms (default 5 min). |
300000
|
max_rows
|
int
|
Max rows to return (0 = no limit). |
0
|
aggregation
|
str
|
Consolidation function: |
'AVERAGE'
|
fallback_attribute
|
Optional[str]
|
Secondary attribute used when the primary doesn't exist. |
None
|
get_measurements_multi(query)
Retrieve measurements for multiple attributes with JEXL expressions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
MeasurementsQuery
|
Query dict with keys: |
required |
Example::
client.get_measurements_multi({
"start": 1425881287182,
"end": 1425967687182,
"step": 300000,
"source": [
{
"resourceId": "node[1].interfaceSnmp[eth0-04013f75f101]",
"attribute": "ifInOctets",
"label": "octetsIn",
"aggregation": "AVERAGE",
"transient": False,
}
],
"expression": [
{"label": "bitsIn", "value": "octetsIn * 8", "transient": False}
],
})
get_minion(minion_id)
Get a specific minion by minion_id.
get_minion_count()
Return the number of minions.
get_minions(limit=10, offset=0)
List all minions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Maximum number of results. Use |
10
|
offset
|
int
|
Number of results to skip (for pagination). |
0
|
get_monitoring_location(name)
Get a specific monitoring location by name.
get_monitoring_location_count()
Return the number of monitoring locations.
get_monitoring_locations(limit=10, offset=0)
List all monitoring locations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Maximum number of results. Use |
10
|
offset
|
int
|
Number of results to skip (for pagination). |
0
|
get_monitoring_system()
Get the main monitoring system information.
get_node(node_id)
Get a single node by database ID or "foreignSource:foreignId".
get_node_asset_record(node_id)
Get the asset record for node_id.
get_node_bridge_elements(node_criteria)
Get bridge elements (one per VLAN) for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_bridge_links(node_criteria)
Get bridge link topology for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_categories(node_id)
List surveillance categories for node_id.
get_node_categories_list(node_id)
Get all categories for node_id.
get_node_category(node_id, category)
Get a specific category association for node_id.
get_node_cdp_element(node_criteria)
Get the CDP element (global config) for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_cdp_links(node_criteria)
Get CDP link topology for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_count()
Return the total number of nodes.
Uses the v2 API because the v1 /nodes endpoint does not
expose a /count sub-resource.
get_node_enlinkd(node_criteria)
Get all EnLinkd topology data for a node (aggregate).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
Returns:
| Type | Description |
|---|---|
|
dict with lldpLinkNodes, cdpLinkNodes, ospfLinkNodes, |
|
|
isisLinkNodes, bridgeLinkNodes (lists), plus element |
|
|
dicts/lists for each protocol. |
get_node_hardware_entity(node_id, ent_physical_index)
Get a specific hardware entity by ent_physical_index.
get_node_hardware_inventory(node_id)
Get the hardware inventory tree for node_id.
get_node_ip_interface(node_id, ip_address)
Get a specific IP interface by ip_address.
get_node_ip_interfaces(node_id, limit=10, offset=0, **filters)
List IP interfaces for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_node_ip_service(node_id, ip_address, service)
Get a specific monitored service.
get_node_ip_services(node_id, ip_address)
List monitored services on ip_address of node_id.
get_node_isis_element(node_criteria)
Get the IS-IS element (system info) for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_isis_links(node_criteria)
Get IS-IS link topology for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_lldp_element(node_criteria)
Get the LLDP element (chassis info) for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_lldp_links(node_criteria)
Get LLDP link topology for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_metadata(node_id)
Get all metadata for node_id.
get_node_metadata_context(node_id, context)
Get all metadata for node_id within context.
get_node_metadata_value(node_id, context, key)
Get a specific metadata value for node_id.
get_node_ospf_element(node_criteria)
Get the OSPF element (router info) for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_ospf_links(node_criteria)
Get OSPF link topology for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
Node DB ID or |
required |
get_node_outages(node_id)
Get all outages for node_id.
get_node_snmp_interface(node_id, ifindex)
Get a specific SNMP interface by ifIndex.
get_node_snmp_interfaces(node_id, limit=10, offset=0, **filters)
List SNMP interfaces for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_nodes(limit=10, offset=0, order_by=None, order=None, **filters)
List nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
**filters
|
Additional Hibernate query filters passed directly as
query parameters (e.g. |
{}
|
get_notification(notification_id)
Get a single notification by ID.
get_notification_count()
Return the total number of notifications.
get_notifications(limit=10, offset=0, order_by=None, order=None, **filters)
List notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
**filters
|
Additional Hibernate query filters passed directly as query parameters (e.g. |
{}
|
get_outage(outage_id)
Get a single outage by ID.
get_outage_count()
Return the total number of outages.
get_outages(limit=10, offset=0, order_by=None, order=None, **filters)
List outages (read-only).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
order_by
|
Optional[str]
|
Field name to sort by. |
None
|
order
|
Optional[str]
|
Sort direction: |
None
|
**filters
|
Additional Hibernate query filters passed directly as
query parameters (e.g. |
{}
|
get_perspective_poller_service_status(app_id, service_id, start=None, end=None)
Get perspective poller status for a specific service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_id
|
int
|
Application database ID. |
required |
service_id
|
int
|
Monitored service database ID. |
required |
start
|
Optional[int]
|
Optional start time in ms since epoch. |
None
|
end
|
Optional[int]
|
Optional end time in ms since epoch. |
None
|
get_perspective_poller_status(app_id, start=None, end=None)
Get perspective poller status for an application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_id
|
int
|
Application database ID. |
required |
start
|
Optional[int]
|
Optional start time in ms since epoch. |
None
|
end
|
Optional[int]
|
Optional end time in ms since epoch. |
None
|
get_prefab_graph(name)
Get a specific prefab graph definition by name.
get_prefab_graph_names()
List all prefab graph names.
Hits the same path as get_graph_containers() but documents the
expected return type when the server is configured for prefab graphs
(a list of name strings).
get_prefab_graphs_for_node(node_criteria)
List prefab graphs available for a given node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
str
|
Node DB ID or |
required |
get_prefab_graphs_for_resource(resource_id)
List prefab graphs available for a given resource_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
Full resource ID, e.g.
|
required |
get_provisiond_job_status(job_id)
Get the status of a specific provisioning job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
Provisioning job ID. |
required |
get_provisiond_status()
Get the current status of the Provisiond daemon.
get_reduce_function(name)
Get a specific reduce function by name.
get_reduce_functions()
List all available reduce functions.
get_requisition(name)
Get a specific requisition by foreign source name.
get_requisition_count()
Return the count of undeployed (pending) requisitions.
get_requisition_names()
List all requisition (foreign source) names.
get_requisition_node(name, foreign_id)
Get a specific node in a requisition by foreign_id.
get_requisition_node_assets(name, foreign_id)
List asset fields for a requisition node.
get_requisition_node_categories(name, foreign_id)
List categories for a requisition node.
get_requisition_node_interfaces(name, foreign_id)
List interfaces for a node in a requisition.
get_requisition_node_services(name, foreign_id, ip_address)
List monitored services on a requisition node interface.
get_requisition_nodes(name)
List nodes in requisition name.
get_requisitions()
List all active (pending or deployed) requisitions.
get_resource(resource_id, depth=-1)
Return the resource tree rooted at resource_id.
resource_id examples:
- "node[1]"
- "node[Servers:router01]"
- "node[1].interfaceSnmp[eth0-04013f75f101]"
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
depth
|
int
|
Tree depth limit. |
-1
|
get_resources(depth=1)
Return the full resource tree (can be expensive on large systems).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
depth
|
int
|
Tree depth limit. |
1
|
get_resources_for_node(node_criteria)
Return all resources for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_criteria
|
str
|
Node DB ID ( |
required |
get_resources_select(nodes=None, filter_rules=None, node_subresources=None, string_properties=None)
Return a partial selection of the resource tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nodes
|
Optional[list]
|
List of node IDs or |
None
|
filter_rules
|
Optional[list]
|
List of filter rule strings. |
None
|
node_subresources
|
Optional[list]
|
List of subresource name strings. |
None
|
string_properties
|
Optional[list]
|
List of string property names to include. |
None
|
get_sched_outage(outage_name)
Get a specific scheduled outage by outage_name.
get_sched_outages()
List all configured scheduled outages.
get_service_metadata(node_id, ip_interface, service)
Get all metadata for service on ip_interface of node_id.
get_service_metadata_context(node_id, ip_interface, service, context)
Get metadata within context for the given service.
get_service_metadata_value(node_id, ip_interface, service, context, key)
Get a specific metadata value for the given service.
get_situation_feedback(situation_id)
Get feedback for a specific situation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
situation_id
|
int
|
Alarm ID of the situation. |
required |
get_situation_feedback_tags(prefix=None)
List situation feedback tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prefix
|
Optional[str]
|
Optional prefix to filter tags. |
None
|
get_situations(limit=10, offset=0)
List situations (v2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
get_snmp_config(ip_address, location=None)
Get the effective SNMP configuration for ip_address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ip_address
|
str
|
Target IP address. |
required |
location
|
Optional[str]
|
Optional monitoring location name. |
None
|
get_snmp_interfaces(fiql=None, limit=10, offset=0)
List SNMP interfaces using the v2 API with optional FIQL filtering.
This is a global (cross-node) read-only view. For write operations
use create_node_snmp_interface() / delete_node_snmp_interface().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fiql
|
Optional[str]
|
FIQL filter string. Examples: |
None
|
limit
|
int
|
Max number of results to return. Use |
10
|
offset
|
int
|
Zero-based offset for pagination. |
0
|
get_snmp_metadata(node_id)
Get SNMP metadata collected for a node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
int
|
Node database ID. |
required |
get_snmptrap_nbi_config()
Get the full SNMP trap NBI configuration.
get_snmptrap_nbi_status()
Get the SNMP trap NBI forwarding status.
get_snmptrap_nbi_trapsink(name)
Get a specific trap sink by name.
get_snmptrap_nbi_trapsinks()
List all SNMP trap NBI trap sinks.
get_syslog_nbi_config()
Get the full syslog NBI configuration.
get_syslog_nbi_destination(name)
Get a specific syslog destination by name.
get_syslog_nbi_destinations()
List all syslog NBI destinations.
get_syslog_nbi_status()
Get the syslog NBI forwarding status.
get_user(username)
Get a specific user by username.
get_user_defined_link(link_id)
Get a specific user-defined link by link_id.
get_user_defined_links()
List all user-defined links.
get_users()
List all users.
get_whoami()
Return information about the currently authenticated user.
import_classification_rules(group_id, csv_text)
Import classification rules from CSV text into a group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
Target group database ID. |
required |
csv_text
|
str
|
CSV-formatted rules to import. |
required |
import_requisition(name, rescan_existing=True)
Synchronise/import requisition name into the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition to import. |
required |
rescan_existing
|
bool
|
When |
True
|
paginate(method, key, page_size=100, **kwargs)
Yield every item from a paginated list endpoint.
Handles limit/offset pagination transparently, stopping
when totalCount is reached or a partial page is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method
|
Callable
|
A bound client method that accepts |
required |
key
|
str
|
The response dict key that holds the list of items
(e.g. |
required |
page_size
|
int
|
Items to request per page. Defaults to |
100
|
**kwargs
|
Any
|
Additional keyword arguments forwarded to method
on every call (e.g. |
{}
|
Yields:
| Type | Description |
|---|---|
Any
|
Individual items from each page, in order. |
Example
Fetch every critical alarm without writing a pagination loop::
for alarm in client.paginate(
client.get_alarms, "alarm", severity="CRITICAL"
):
print(alarm["id"], alarm["nodeLabel"])
reload_business_service_daemon()
Reload the Business Service Monitoring daemon.
remove_alarms_from_situation(situation_id, alarm_ids)
Remove specific alarm IDs from a situation without clearing them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
situation_id
|
int
|
Target situation ID. |
required |
alarm_ids
|
list
|
List of integer alarm IDs to remove. |
required |
remove_business_service_edge(service_id, edge_id)
Remove an edge from a business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
int
|
Database ID of the business service. |
required |
edge_id
|
int
|
Database ID of the edge to remove. |
required |
remove_category_from_group(group_name, category_name)
Remove category_name from group_name.
remove_user_from_group(group_name, username)
Remove username from group_name.
rescan_node(node_id)
Trigger a capability scan of node_id for new interfaces/services.
revoke_role_from_user(username, role_name)
Revoke role_name from username.
set_email_nbi_status(enabled)
Enable or disable email NBI forwarding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled
|
bool
|
|
required |
set_eventconf_events_status(source_id, payload)
Set the enabled/disabled status of events within a source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
payload
|
dict
|
Dict mapping event IDs to boolean status values. |
required |
set_eventconf_sources_status(payload)
Set the enabled/disabled status of event configuration sources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict
|
Dict mapping source IDs to boolean status values. |
required |
set_interface_metadata(node_id, ip_interface, metadata)
Set metadata for the given interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_interface
|
str
|
IP address of the interface. |
required |
metadata
|
list
|
List of dicts with keys |
required |
set_interface_metadata_value(node_id, ip_interface, context, key, value)
Set a single metadata key/value for the given interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_interface
|
str
|
IP address of the interface. |
required |
context
|
str
|
Metadata context (must be user-defined, prefixed |
required |
key
|
str
|
Metadata key name. |
required |
value
|
str
|
Metadata value string. |
required |
set_javamail_default_config(data)
Update the default Javamail configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
JavamailDefaultConfig
|
Configuration data dict. |
required |
set_node_metadata(node_id, metadata)
Set metadata entries for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
metadata
|
list
|
List of dicts with keys |
required |
set_node_metadata_value(node_id, context, key, value)
Set a single metadata key/value for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
context
|
str
|
Metadata context (must be user-defined, prefixed |
required |
key
|
str
|
Metadata key name. |
required |
value
|
str
|
Metadata value string. |
required |
set_requisition_node_asset(name, foreign_id, asset)
Add or replace an asset on a requisition node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node. |
required |
asset
|
dict
|
Asset dict. Example: |
required |
set_service_metadata(node_id, ip_interface, service, metadata)
Set metadata for the given service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_interface
|
str
|
IP address of the interface. |
required |
service
|
str
|
Monitored service name. |
required |
metadata
|
list
|
List of dicts with keys |
required |
set_service_metadata_value(node_id, ip_interface, service, context, key, value)
Set a single metadata key/value for the given service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_interface
|
str
|
IP address of the interface. |
required |
service
|
str
|
Monitored service name. |
required |
context
|
str
|
Metadata context (must be user-defined, prefixed |
required |
key
|
str
|
Metadata key name. |
required |
value
|
str
|
Metadata value string. |
required |
set_snmp_config(ip_address, config)
Add or update the SNMP configuration for ip_address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ip_address
|
str
|
Target IP address. |
required |
config
|
SnmpConfig
|
SNMP configuration. See :class: |
required |
set_snmptrap_nbi_status(enabled)
Enable or disable SNMP trap NBI forwarding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled
|
bool
|
|
required |
set_syslog_nbi_status(enabled)
Enable or disable syslog NBI forwarding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled
|
bool
|
|
required |
submit_situation_feedback(situation_id, feedback)
Submit feedback for a situation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
situation_id
|
int
|
Alarm ID of the situation. |
required |
feedback
|
list
|
List of feedback entry dicts, each with keys such
as |
required |
trigger_destination_path(destination_path_name)
Trigger the targets of destination_path_name for testing.
unack_alarm(alarm_id)
Remove acknowledgement from alarm alarm_id.
unack_event(event_id)
Remove acknowledgement from event event_id.
unack_notification(notification_id)
Remove acknowledgement from notification notification_id.
update_business_service(service_id, service)
Update a business service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_id
|
int
|
Database ID of the business service to update. |
required |
service
|
BusinessService
|
Updated business service definition dict. |
required |
update_category(category, data)
Update a category.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category
|
str
|
Category name to update. |
required |
data
|
Category
|
Dict of category fields to change. |
required |
update_classification_group(group_id, group)
Update a classification group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
Database ID of the group. |
required |
group
|
ClassificationGroup
|
Updated group definition dict. |
required |
update_classification_rule(rule_id, rule)
Update a classification rule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_id
|
int
|
Database ID of the rule to update. |
required |
rule
|
ClassificationRule
|
Updated rule definition dict. |
required |
update_config(name, config_id, data)
Update a configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Configuration name. |
required |
config_id
|
str
|
Configuration identifier. |
required |
data
|
dict
|
Updated configuration data dict. |
required |
update_credential(alias, data)
Update an existing credential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
Credential alias. |
required |
data
|
Credential
|
Updated credential dict. |
required |
update_email_nbi_config(data)
Update the email NBI configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
EmailNbiConfig
|
Updated configuration data dict. |
required |
update_email_nbi_destination(name, data)
Update an email NBI destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the destination to update. |
required |
data
|
EmailNbiDestination
|
Form-encoded key/value pairs to update. |
required |
update_eventconf_event(source_id, event_id, event)
Update an event definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_id
|
str
|
Event configuration source identifier. |
required |
event_id
|
str
|
Event identifier within the source. |
required |
event
|
EventConfEvent
|
Updated event definition dict. |
required |
update_foreign_source(name, foreign_source)
Update an existing foreign source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name to update. |
required |
foreign_source
|
ForeignSource
|
Updated foreign source definition dict. |
required |
update_group(group_name, group)
Update group metadata (e.g. comments field).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_name
|
str
|
Name of the group to update. |
required |
group
|
Group
|
Dict of group fields to change. |
required |
update_ifservices(**kwargs)
Bulk-update monitored services.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Form-encoded key/value pairs to update, e.g.
|
{}
|
update_javamail_end2end(name, data)
Update an end-to-end mail test configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the end-to-end configuration. |
required |
data
|
JavamailEnd2End
|
Form-encoded key/value pairs to update. |
required |
update_javamail_readmail(name, data)
Update a read-mail configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the read-mail configuration. |
required |
data
|
JavamailReadmail
|
Form-encoded key/value pairs to update. |
required |
update_javamail_sendmail(name, data)
Update a send-mail configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the send-mail configuration. |
required |
data
|
JavamailSendmail
|
Form-encoded key/value pairs to update. |
required |
update_ksc_report(report_id, report)
Modify an existing KSC report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report_id
|
int
|
Database ID of the KSC report to update. |
required |
report
|
KscReport
|
Updated report definition dict (same structure as
|
required |
update_map(map_id, map_data)
Update map properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
map_id
|
int
|
Database ID of the map to update. |
required |
map_data
|
Map
|
Dict of map fields to change. |
required |
update_monitoring_location(name, data)
Update a monitoring location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the monitoring location to update. |
required |
data
|
dict
|
Form-encoded key/value pairs to update. |
required |
update_node(node_id, node)
Update node properties (PUT /rest/nodes/{id}).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
node
|
Node
|
Dict of node fields to change. |
required |
update_node_asset_record(node_id, asset)
Update the asset record for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
asset
|
NodeAssetRecord
|
Dict of asset fields to change. Common fields:
|
required |
update_node_category(node_id, category, data)
Update a category association for node_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
category
|
str
|
Category name to update. |
required |
data
|
Category
|
Dict of category fields to change. |
required |
update_node_hardware_entity(node_id, ent_physical_index, data)
Update a specific hardware entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ent_physical_index
|
int
|
ENTITY-MIB entPhysicalIndex of the entity. |
required |
data
|
HardwareEntity
|
Dict of entity fields to change. |
required |
update_node_ip_interface(node_id, ip_address, interface)
Update an IP interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ip_address
|
str
|
IP address of the interface to update. |
required |
interface
|
NodeIpInterface
|
Dict of interface fields to change. |
required |
update_node_snmp_interface(node_id, ifindex, interface)
Update an SNMP interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
Node database ID or |
required | |
ifindex
|
int
|
SNMP ifIndex of the interface to update. |
required |
interface
|
NodeSnmpInterface
|
Dict of interface fields to change. |
required |
update_requisition(name, data)
Update metadata on an existing requisition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
data
|
Requisition
|
Dict of requisition fields to change. |
required |
update_requisition_node(name, foreign_id, node)
Update a node in requisition name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node to update. |
required |
node
|
RequisitionNode
|
Dict of node fields to change. |
required |
update_requisition_node_interface(name, foreign_id, ip_address, interface)
Update an interface on a requisition node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Foreign source name of the requisition. |
required |
foreign_id
|
str
|
Foreign ID of the node. |
required |
ip_address
|
str
|
IP address of the interface to update. |
required |
interface
|
dict
|
Dict of interface fields to change. |
required |
update_snmptrap_nbi_config(data)
Update the SNMP trap NBI configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
SnmpTrapNbiConfig
|
Updated configuration data dict. |
required |
update_snmptrap_nbi_trapsink(name, data)
Update a trap sink.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the trap sink to update. |
required |
data
|
SnmpTrapNbiTrapSink
|
Form-encoded key/value pairs to update. |
required |
update_syslog_nbi_config(data)
Update the syslog NBI configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
SyslogNbiConfig
|
Updated configuration data dict. |
required |
update_syslog_nbi_destination(name, data)
Update a syslog NBI destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the destination to update. |
required |
data
|
SyslogNbiDestination
|
Form-encoded key/value pairs to update. |
required |
update_user(username, user)
Update user properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username of the user to update. |
required |
user
|
User
|
Dict of user fields to change. Pass only the fields to update. |
required |
upload_eventconf(file_path_or_bytes)
Upload an event configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path_or_bytes
|
Either a file path (str) or raw bytes to upload as multipart form data. |
required |
Payload types
types
TypedDict schemas for OpenNMS API request payloads.
These types describe the dict arguments accepted by write methods on
:class:~opennms_api_wrapper.OpenNMS. All fields are total=False
(every field is optional at the Python level); fields marked Required
in the descriptions must be included or the server will return a 400.
Plain dicts are accepted everywhere a TypedDict is annotated — the types exist purely for documentation and static type checking.
Example usage::
from opennms_api_wrapper.types import SnmpConfig, RequisitionNode
client.set_snmp_config("10.0.0.1", SnmpConfig(version="v2c", community="public"))
node: RequisitionNode = {
"foreign-id": "router01",
"node-label": "router01.example.com",
"interface": [{"ip-addr": "10.0.0.1", "snmp-primary": "P", "status": 1}],
}
client.create_requisition_node("Routers", node)
Node
Bases: TypedDict
Node payload for :meth:~opennms_api_wrapper.OpenNMS.create_node and
:meth:~opennms_api_wrapper.OpenNMS.update_node.
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str
|
Required for create. Human-readable node display name. |
type |
str
|
Node type. |
foreignSource |
str
|
Requisition / foreign source name. |
foreignId |
str
|
Unique ID within the foreign source. |
location |
str
|
Monitoring location name. Defaults to |
sysName |
str
|
SNMP sysName. |
sysDescription |
str
|
SNMP sysDescr. |
sysContact |
str
|
SNMP sysContact. |
sysLocation |
str
|
SNMP sysLocation. |
NodeIpInterface
Bases: TypedDict
IP interface payload for
:meth:~opennms_api_wrapper.OpenNMS.create_node_ip_interface and
:meth:~opennms_api_wrapper.OpenNMS.update_node_ip_interface.
Attributes:
| Name | Type | Description |
|---|---|---|
ipAddress |
str
|
Required for create. IP address of the interface. |
isManaged |
str
|
Management status. |
snmpPrimary |
str
|
SNMP primary flag. |
hostName |
str
|
Reverse-DNS hostname for this interface. |
NodeSnmpInterface
Bases: TypedDict
SNMP interface payload for
:meth:~opennms_api_wrapper.OpenNMS.create_node_snmp_interface and
:meth:~opennms_api_wrapper.OpenNMS.update_node_snmp_interface.
Attributes:
| Name | Type | Description |
|---|---|---|
ifIndex |
int
|
Required for create. SNMP ifIndex. |
ifName |
str
|
Interface name, e.g. |
ifDescr |
str
|
Interface description from SNMP ifDescr. |
ifAlias |
str
|
Interface alias from SNMP ifAlias. |
ifType |
int
|
SNMP ifType integer (6 = ethernetCsmacd). |
collect |
str
|
Collection flag. |
poll |
str
|
Poll flag. |
NodeAssetRecord
Bases: TypedDict
Asset record payload for
:meth:~opennms_api_wrapper.OpenNMS.update_node_asset_record.
All fields are optional. Pass only the fields you want to change.
Attributes:
| Name | Type | Description |
|---|---|---|
category |
str
|
Asset category, e.g. |
manufacturer |
str
|
Hardware manufacturer. |
vendor |
str
|
Vendor name. |
modelNumber |
str
|
Model number. |
serialNumber |
str
|
Serial number. |
description |
str
|
Free-text description. |
operatingSystem |
str
|
Operating system name and version. |
rack |
str
|
Rack identifier. |
building |
str
|
Building identifier. |
floor |
str
|
Floor identifier. |
room |
str
|
Room identifier. |
country |
str
|
Country code. |
HardwareEntity
Bases: TypedDict
Hardware inventory entity payload for
:meth:~opennms_api_wrapper.OpenNMS.add_node_hardware_inventory and
:meth:~opennms_api_wrapper.OpenNMS.update_node_hardware_entity.
Attributes:
| Name | Type | Description |
|---|---|---|
entityPhysicalIndex |
int
|
Required for create. ENTITY-MIB entPhysicalIndex. |
entPhysicalDescr |
str
|
Physical description. |
entPhysicalClass |
int
|
Physical class integer (e.g. 3 = chassis). |
entPhysicalName |
str
|
Physical name. |
entPhysicalSerialNum |
str
|
Serial number. |
entPhysicalMfgName |
str
|
Manufacturer name. |
entPhysicalModelName |
str
|
Model name. |
entPhysicalIsFRU |
bool
|
Whether this entity is a field-replaceable unit. |
children |
List[dict]
|
Child hardware entities. |
Group
Bases: TypedDict
Group payload for :meth:~opennms_api_wrapper.OpenNMS.create_group
and :meth:~opennms_api_wrapper.OpenNMS.update_group.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required for create. Unique group name. |
comments |
str
|
Free-text description of the group. |
Category
Bases: TypedDict
Category payload for :meth:~opennms_api_wrapper.OpenNMS.create_category
and :meth:~opennms_api_wrapper.OpenNMS.update_category.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required for create. Unique category name. |
authorizedGroups |
List[str]
|
Groups authorized to see this category. |
SchedOutageTime
Bases: TypedDict
Time window entry within a :class:SchedOutage.
Attributes:
| Name | Type | Description |
|---|---|---|
day |
str
|
Day specifier. For |
begins |
str
|
Start time |
ends |
str
|
End time in the same format as begins. |
SchedOutage
Bases: TypedDict
Scheduled outage payload for
:meth:~opennms_api_wrapper.OpenNMS.create_sched_outage.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique scheduled outage name. |
type |
str
|
Outage type: |
time |
List[SchedOutageTime]
|
List of time windows during which the outage applies. |
node |
List[dict]
|
Nodes to suppress during the outage,
e.g. |
interface |
List[dict]
|
IP interfaces to suppress,
e.g. |
KscGraph
Bases: TypedDict
Graph entry within a :class:KscReport.
Attributes:
| Name | Type | Description |
|---|---|---|
title |
str
|
Graph title. |
resourceId |
str
|
OpenNMS resource ID,
e.g. |
timespan |
str
|
Timespan identifier, e.g. |
graphtype |
str
|
Graph type (RRD graph definition name),
e.g. |
graphIndex |
int
|
Position of this graph within the report. |
KscReport
Bases: TypedDict
KSC report payload for
:meth:~opennms_api_wrapper.OpenNMS.create_ksc_report and
:meth:~opennms_api_wrapper.OpenNMS.update_ksc_report.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Report ID (set to |
label |
str
|
Required. Report display name. |
show_timespan_button |
bool
|
Show the timespan selection button. |
show_graphtype_button |
bool
|
Show the graph type selection button. |
graphs_per_line |
int
|
Number of graphs per row. |
graphs |
List[KscGraph]
|
List of graph definitions. |
Map
Bases: TypedDict
Map payload for :meth:~opennms_api_wrapper.OpenNMS.create_map
and :meth:~opennms_api_wrapper.OpenNMS.update_map.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required for create. Unique map name. |
mapWidth |
int
|
Map canvas width in pixels. |
mapHeight |
int
|
Map canvas height in pixels. |
accessMode |
str
|
Access control mode: |
owner |
str
|
Username of the map owner. |
Event
Bases: TypedDict
Event payload for :meth:~opennms_api_wrapper.OpenNMS.create_event.
Attributes:
| Name | Type | Description |
|---|---|---|
uei |
str
|
Required. Event UEI,
e.g. |
source |
str
|
Event source identifier (name of the generating script or application). |
severity |
str
|
Event severity: |
nodeId |
int
|
Database ID of the associated node. |
interface |
str
|
IP address of the associated interface. |
service |
str
|
Service name of the associated service. |
ifIndex |
int
|
SNMP ifIndex of the associated interface. |
description |
str
|
HTML-formatted description. |
logMsg |
str
|
Short log message text. |
operInstruct |
str
|
Operator instructions. |
parms |
Dict[str, Any]
|
Event parameters as
|
EventConfLogmsg
Bases: TypedDict
Log message entry within an :class:EventConfEvent.
Attributes:
| Name | Type | Description |
|---|---|---|
content |
str
|
Log message text. |
dest |
str
|
Destination: |
EventConfEvent
Bases: TypedDict
Event definition payload for
:meth:~opennms_api_wrapper.OpenNMS.create_eventconf_event and
:meth:~opennms_api_wrapper.OpenNMS.update_eventconf_event.
Attributes:
| Name | Type | Description |
|---|---|---|
uei |
str
|
Required. Event UEI. |
label |
str
|
Human-readable label. |
descr |
str
|
HTML-formatted description. |
logmsg |
EventConfLogmsg
|
Log message configuration. |
severity |
str
|
Event severity: |
MeasurementSource
Bases: TypedDict
Data source entry within a :class:MeasurementsQuery.
Attributes:
| Name | Type | Description |
|---|---|---|
resourceId |
str
|
Required. OpenNMS resource ID,
e.g. |
attribute |
str
|
Required. RRD attribute name, e.g. |
label |
str
|
Required. Column label used in expressions and output. |
aggregation |
str
|
Consolidation function: |
transient |
bool
|
When |
MeasurementExpression
Bases: TypedDict
JEXL expression entry within a :class:MeasurementsQuery.
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str
|
Required. Output column label. |
value |
str
|
Required. JEXL expression referencing source labels,
e.g. |
transient |
bool
|
When |
MeasurementsQuery
Bases: TypedDict
Query payload for
:meth:~opennms_api_wrapper.OpenNMS.get_measurements_multi.
Attributes:
| Name | Type | Description |
|---|---|---|
start |
int
|
Query start time as a Unix millisecond epoch timestamp. |
end |
int
|
Query end time as a Unix millisecond epoch timestamp. |
step |
int
|
Desired step size in milliseconds. |
maxrows |
int
|
Maximum number of time-step rows to return. |
source |
List[MeasurementSource]
|
List of data sources to fetch. |
expression |
List[MeasurementExpression]
|
List of JEXL expressions computed from source labels. |
BsFunction
Bases: TypedDict
Map or reduce function reference within a Business Service definition.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Function name, e.g. |
properties |
Dict[str, str]
|
Function-specific properties dict,
e.g. |
BusinessService
Bases: TypedDict
Business service payload for
:meth:~opennms_api_wrapper.OpenNMS.create_business_service and
:meth:~opennms_api_wrapper.OpenNMS.update_business_service.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique business service name. |
attributes |
Dict[str, str]
|
Arbitrary key/value metadata dict. |
reduceFunction |
BsFunction
|
Reduce function configuration. |
BsIpServiceEdge
Bases: TypedDict
IP-service edge payload for
:meth:~opennms_api_wrapper.OpenNMS.add_ip_service_edge.
Attributes:
| Name | Type | Description |
|---|---|---|
ipServiceId |
int
|
Required. Database ID of the monitored IP service. |
mapFunction |
BsFunction
|
Map function configuration. |
weight |
int
|
Edge weight (higher weight = greater influence). |
BsReductionKeyEdge
Bases: TypedDict
Reduction-key edge payload for
:meth:~opennms_api_wrapper.OpenNMS.add_reduction_key_edge.
Attributes:
| Name | Type | Description |
|---|---|---|
reductionKey |
str
|
Required. Alarm reduction key to monitor. |
mapFunction |
BsFunction
|
Map function configuration. |
weight |
int
|
Edge weight. |
BsChildEdge
Bases: TypedDict
Child-service edge payload for
:meth:~opennms_api_wrapper.OpenNMS.add_child_edge.
Attributes:
| Name | Type | Description |
|---|---|---|
childId |
int
|
Required. Database ID of the child business service. |
mapFunction |
BsFunction
|
Map function configuration. |
weight |
int
|
Edge weight. |
ClassificationRule
Bases: TypedDict
Classification rule payload for
:meth:~opennms_api_wrapper.OpenNMS.create_classification_rule and
:meth:~opennms_api_wrapper.OpenNMS.update_classification_rule.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Application name this rule identifies. |
dstPort |
str
|
Destination port or range, e.g. |
srcPort |
str
|
Source port or range. |
dstAddress |
str
|
Destination IP address or CIDR, e.g. |
srcAddress |
str
|
Source IP address or CIDR. |
protocol |
str
|
Protocol: |
exporterFilter |
str
|
FIQL filter selecting which exporters this rule applies to. |
groupId |
int
|
ID of the classification group this rule belongs to. |
position |
int
|
Sort position within the group. |
ClassificationGroup
Bases: TypedDict
Classification group payload for
:meth:~opennms_api_wrapper.OpenNMS.create_classification_group and
:meth:~opennms_api_wrapper.OpenNMS.update_classification_group.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique group name. |
enabled |
bool
|
Whether this group's rules are active. |
ClassifyRequest
Bases: TypedDict
Flow classification request for
:meth:~opennms_api_wrapper.OpenNMS.classify.
Attributes:
| Name | Type | Description |
|---|---|---|
srcAddress |
str
|
Source IP address. |
srcPort |
int
|
Source port number. |
dstAddress |
str
|
Destination IP address. |
dstPort |
int
|
Destination port number. |
protocol |
str
|
Protocol integer or name. |
exporterAddress |
str
|
IP address of the flow exporter. |
Credential
Bases: TypedDict
Secure Credentials Vault payload for
:meth:~opennms_api_wrapper.OpenNMS.create_credential and
:meth:~opennms_api_wrapper.OpenNMS.update_credential.
Attributes:
| Name | Type | Description |
|---|---|---|
alias |
str
|
Required for create. Unique credential alias. |
username |
str
|
Credential username. |
password |
str
|
Credential password. |
attributes |
Dict[str, str]
|
Additional key/value attributes dict. |
Application
Bases: TypedDict
Application payload for
:meth:~opennms_api_wrapper.OpenNMS.create_application.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique application name. |
monitoredServices |
List[dict]
|
List of monitored service ID references,
e.g. |
UserDefinedLink
Bases: TypedDict
User-defined link payload for
:meth:~opennms_api_wrapper.OpenNMS.create_user_defined_link.
Attributes:
| Name | Type | Description |
|---|---|---|
nodeIdA |
int
|
Required. Database ID of the A-side node. |
nodeIdZ |
int
|
Required. Database ID of the Z-side node. |
componentLabelA |
str
|
Label for the A-side component (e.g. interface name). |
componentLabelZ |
str
|
Label for the Z-side component. |
linkId |
str
|
Unique link identifier string. |
linkLabel |
str
|
Human-readable link label. |
owner |
str
|
Username of the link owner. |
SnmpConfig
Bases: TypedDict
SNMP configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.set_snmp_config.
Fields correspond to <definition/> attributes in
snmp-config.xsd. Unset fields inherit from the OpenNMS default
SNMP configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
version |
str
|
SNMP version: |
community |
str
|
Community string (v1/v2c only). |
port |
int
|
UDP port. Default |
timeout |
int
|
Timeout in milliseconds. |
retries |
int
|
Retry count before giving up. |
maxVarsPerPdu |
int
|
Maximum variables per GETBULK PDU. |
maxRepetitions |
int
|
Maximum repetitions for GETBULK. |
maxRequestSize |
int
|
Maximum PDU size in bytes. |
proxyHost |
str
|
Proxy host IP for this definition. |
securityName |
str
|
SNMPv3 security name (username). |
securityLevel |
int
|
SNMPv3 security level —
|
authPassphrase |
str
|
SNMPv3 authentication passphrase. |
authProtocol |
str
|
SNMPv3 auth protocol: |
privPassphrase |
str
|
SNMPv3 privacy passphrase. |
privProtocol |
str
|
SNMPv3 privacy protocol: |
contextName |
str
|
SNMPv3 context name. |
SnmpTrapNbiTrapSink
Bases: TypedDict
SNMP trap sink payload for
:meth:~opennms_api_wrapper.OpenNMS.create_snmptrap_nbi_trapsink and
:meth:~opennms_api_wrapper.OpenNMS.update_snmptrap_nbi_trapsink.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique trap sink name. |
ipAddress |
str
|
Required. Destination IP address. |
port |
int
|
Destination UDP port. Default |
community |
str
|
SNMP community string. Default |
SnmpTrapNbiConfig
Bases: TypedDict
SNMP trap NBI configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.update_snmptrap_nbi_config.
Attributes:
| Name | Type | Description |
|---|---|---|
enabled |
bool
|
Whether SNMP trap forwarding is enabled. |
trapsinks |
List[SnmpTrapNbiTrapSink]
|
List of trap sink definitions. |
EmailNbiDestination
Bases: TypedDict
Email NBI destination payload for
:meth:~opennms_api_wrapper.OpenNMS.create_email_nbi_destination and
:meth:~opennms_api_wrapper.OpenNMS.update_email_nbi_destination.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique destination name. |
firstOccurrenceOnly |
bool
|
When |
filters |
List[str]
|
List of alarm filter expressions. |
EmailNbiConfig
Bases: TypedDict
Email NBI configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.update_email_nbi_config.
Attributes:
| Name | Type | Description |
|---|---|---|
enabled |
bool
|
Whether email alarm forwarding is enabled. |
destinations |
List[EmailNbiDestination]
|
List of destination definitions. |
SyslogNbiDestination
Bases: TypedDict
Syslog NBI destination payload for
:meth:~opennms_api_wrapper.OpenNMS.create_syslog_nbi_destination and
:meth:~opennms_api_wrapper.OpenNMS.update_syslog_nbi_destination.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique destination name. |
host |
str
|
Required. Destination hostname or IP address. |
port |
int
|
Destination UDP/TCP port. Default |
firstOccurrenceOnly |
bool
|
When |
filters |
List[str]
|
List of alarm filter expressions. |
SyslogNbiConfig
Bases: TypedDict
Syslog NBI configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.update_syslog_nbi_config.
Attributes:
| Name | Type | Description |
|---|---|---|
enabled |
bool
|
Whether syslog alarm forwarding is enabled. |
destinations |
List[SyslogNbiDestination]
|
List of destination definitions. |
JavamailDefaultConfig
Bases: TypedDict
Default Javamail configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.set_javamail_default_config.
Attributes:
| Name | Type | Description |
|---|---|---|
defaultReadConfigName |
str
|
Name of the default read-mail configuration. |
defaultSendConfigName |
str
|
Name of the default send-mail configuration. |
defaultEnd2endConfigName |
str
|
Name of the default end-to-end test configuration. |
JavamailReadmail
Bases: TypedDict
Read-mail configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.create_javamail_readmail and
:meth:~opennms_api_wrapper.OpenNMS.update_javamail_readmail.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique configuration name. |
host |
str
|
Mail server hostname. |
port |
int
|
Mail server port (e.g. |
protocol |
str
|
Mail protocol: |
JavamailSendmail
Bases: TypedDict
Send-mail configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.create_javamail_sendmail and
:meth:~opennms_api_wrapper.OpenNMS.update_javamail_sendmail.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique configuration name. |
host |
str
|
SMTP server hostname. |
port |
int
|
SMTP server port (e.g. |
protocol |
str
|
SMTP protocol: |
JavamailEnd2End
Bases: TypedDict
End-to-end mail test configuration payload for
:meth:~opennms_api_wrapper.OpenNMS.create_javamail_end2end and
:meth:~opennms_api_wrapper.OpenNMS.update_javamail_end2end.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Unique configuration name. |
readMailConfigName |
str
|
Read-mail configuration to use. |
sendMailConfigName |
str
|
Send-mail configuration to use. |