Thanks to visit codestin.com
Credit goes to support.nectus5.com

< Back to Methods

Edit SNMP Device Tags (editDeviceTags)

(Nectus Version: 2.0.6.1)

editDeviceTags can be used to set Tags for SNMP Devices.

To set tags you need to send multi-level object:

{
  "Tag name" : [
      {"value": "New value", "devices": [ list of devices ids ] }
  ]
}

If you need to set several values for a Multi select tag, you need to use 'values' params instead of 'value', and then array of values:

{
  "Tag name" : [
      {"values": ["value1","value2"], "devices": [ list of devices ids ] }
  ]
}

If you need to clear values of the tags, use empty value for 'value/values' params.

URL

https://{ServerName}/snmp/restAPI/editDeviceTags

ServerName is the FQDN of the server where Nectus is deployed.

Method

PUT

Request Parameters

Header

Header should contain an authorization token.

Parameter Description Type Required Default Value
token Authorization token 1 1

Payload/Data Parameters

Parameter Description Type Required Default Value
value New value for the tag String Mandatory
values New values for a Multi select tag. Use need to set several values to a Multi select tag. Array Optional
devices Array of devices' ids Array Mandatory

Response Parameters

For list of common errors, kindly refer to section Response and Error Codes.

Usage Example

You can set Tags in the main menu Settings -> General Settings -> Tags

type_in_tag can have any value like text string.

Country is a single select tag, and can have only one value from the list you set in the settings:

multi_tag can have several values from the defined list:

To set values to devices use this query: