
= SNMP Interfaces

Obtain a list of SNMP interfaces based on a set of criteria.

NOTE: This API is v2-only, and uses link:https://github.com/jirutka/rsql-parser#rsql--fiql-parser[FIQL] for querying.

Examples:

* `/api/v2/snmpinterfaces?_s=node.label==onms-prd-01`
* `/api/v2/snmpinterfaces?_s=ifIndex==6`

== GET (reading data)

[caption=]
.SNMP Interfaces API GET function
[options="autowidth"]
|===
| Resource  | Description

| /snmpinterfaces
| Get all SNMP interfaces for the given search criteria.
|===

Example:

Get SNMP interfaces whose node are in the foreign source `Servers` and are associated with IP address `127.0.0.1`:

[source, bash]
----
curl -u admin:admin "http://localhost:8980/opennms/api/v2/snmpinterfaces?_s=node.foreignSource==Servers;ipInterfaces.ipAddress=127.0.0.1"
----

== PUTs/POSTs (modifying data)

The `/snmpinterfaces` REST API is read-only.
To create new SNMP interfaces, use the `snmpinterfaces` resources under the xref:rest/nodes.adoc[nodes endpoint].
