Set Interface Alias Names Using the Devices Web Service

As an administrator, you can set aliases for interfaces per device item.
As an Administrator, you can set an alias name for an interface using the
devices
endpoint for the
NetOps Portal
REST web service. The alias name appears in dashboards and in views depending on a user's role rights.
You can also set an alias name for an interface using the
update_alias_name.sh
script. You can use this script to set the alias names for multiple interfaces. Interface alias names set using REST web services take precedence over the alias names that are set using the
update_alias_name.sh
script.
For more information, see Set Alias Names Using a Script.
The following URL shows the syntax for the
devices
endpoint for the
NetOps Portal
REST service:
http://
PC_host
:8181/pc/center/webservice/devices
Follow these steps:
  1. Determine the interfaces for which you want to set an alias name by issuing a GET request to
    one
    of the following
    devices
    endpoint for the
    NetOps Portal
    REST service:
    http://
    PC_host
    :8181/pc/center/webservice/devices/deviceItemId/<
    device_id>
    /interfaces
    • device_id
      The device item identification number for the monitored device with which the interface is associated.
    http://
    PC_host
    :8181/pc/center/webservice/devices/domainItemId/
    <domain_id>
    /
    <device_IP>
    /interfaces
    • domain_id
      The identification number for the IP domain that the device is in.
    • device_IP
      The IP address of the device.
    A list of interfaces for the device is shown in the response.
  2. Issue a PUT request to
    one
    of the following
    devices
    endpoints for the
    NetOps Portal
    REST service, with the following body:
    http://
    PC_host
    :8181/pc/center/webservice/devices/deviceItemId/<
    device_id>
    /setInterfaceNameAlias
    • device_id
      The identification number for the device item with which the interface is associated.
    http://
    PC_host
    :8181/pc/center/webservice/devices/domainItemId/<
    domain_id>
    /<
    device_IP>
    /setInterfaceNameAlias
    • domain_id
      The identification number for the IP domain that the device is in.
    • device_IP
      The IP address of the device.
    Body:
    <interfaces>
    <interface>
    <itemId>interface_item_id</itemId>
    <nameAlias>alias_for_interface</nameAlias>
    </interface>
    ...
    </interfaces>
    Example:
    <interfaces>
    <interface>
    <itemId>164</itemId>
    <nameAlias>Et0 - alias</nameAlias>
    </interface>
    <interface>
    <itemId>165</itemId>
    <nameAlias>Se0 - alias</nameAlias>
    </interface>
    </interfaces>
    • interface_item_ id
      The identifier of the interface for which you want to set an alias name.
    • alias_for_interface
      The alias name that you want to set for the interface.