RESTAPI Manual
Visibility and Monitoring
SNMP
12 min
urls summary urls summary url get post patch put delete /rest/v1/running/snmp communities/{community name} y y n n y /rest/v1/running/snmp sources/{source ip}/{udp port}/{vrf name} y y n n y /rest/v1/running/snmp traps/{trap type} y n n y y /rest/v1/running/snmp users/{user name} y y n n y examples examples create a snmp community create a snmp community post https //{switch ip}/rest/v1/running/snmp communities { "community name" "test" } create an snmp source create an snmp source post https //{switch ip}/rest/v1/running/snmp sources { "source ip" "10 0 0 100", "udp port" "162", "vrf name" "default" } replace a snmp trap replace a snmp trap put https //{switch ip}/rest/v1/running/snmp traps/v2c { "trap ip" "10 50 1 2", "udp port" 163, "vrf name" "vrftest1", "community name" "default" } create a snmp user create a snmp user post rest/v1/running/snmp users { "user name" "test3", "authen mode" "sha", "authen key" "123456789", "privacy mode" "aes", "privacy key" "987654321" } properties descriptions properties descriptions snmp communities snmp communities tree diagrams + rw snmp communities \| + rw snmp community \[community name] \| + rw community name table of properties name required type/range description snmp communities m path only node, has no configurable value community name m string (sub property of snmp communities) snmp agent community configuration, "public" is the default value and is not allowed to be configured snmp users snmp users tree diagrams + rw snmp users \| + rw snmp user \[user name] \| + rw user name \| + rw authen mode? \| + rw authen key \| + rw privacy mode? \| + rw privacy key \| + ro user type? table of properties name required type/range description snmp users m path only node, has no configurable value user name m string (sub property of snmp users) authen mode o "md5" "sha" (sub property of snmp users) enables authentication of the user authen key cm a string of letters, digits, underscores, or hyphens (0 or more characters) (sub property of snmp users) only applicable when authen mode the key used in md5 or sha based authentication algorithms for user authentication privacy mode co "des" "aes" (sub property of snmp users) only applicable when authen mode enables privacy of the user privacy key cm a string of letters, digits, underscores, or hyphens (0 or more characters) (sub property of snmp users) only applicable when privacy mode a secret key used by the des or aes based encryption algorithm for authentication password user type ro "noauthnopriv" "authnopriv" "priv" (sub property of snmp users) snmp sources snmp sources tree diagrams + rw snmp sources \| + rw snmp source \[source ip udp port vrf name] \| + rw source ip \| + rw udp port \| + rw vrf name table of properties name required type/range description snmp sources m path only node, has no configurable value source ip m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of snmp sources) udp port m 0 65535 (sub property of snmp sources) set snmp source udp port, default 161 vrf name m "default" vrf name (sub property of snmp sources) set snmp source vrf, default default(if use default, will set '' in config db) snmp traps snmp traps tree diagrams + rw snmp traps + rw snmp trap \[trap type] + rw trap type + rw trap ip + rw vrf name? + rw udp port? + rw community name? + rw user name table of properties name required type/range description snmp traps m path only node, has no configurable value trap type m "v1" "v2c" "v3" (sub property of snmp traps) trap ip m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of snmp traps) vrf name o "default" vrf name (sub property of snmp traps) udp port o 0 65535 (sub property of snmp traps) default value 162 community name co string (sub property of snmp traps) only applicable when trap type = "v1" or trap type = "v2c" user name cm string (sub property of snmp traps) only applicable when trap type = "v3"
