Set Component Alias Names Using the Devices Web Service

As an administrator, you can set aliases for components per device item.
As an Administrator, you can set the alias name for a component 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 a component using the
update_alias_name.sh
script. You can use this script to set the alias names for multiple components. Component 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 components for which you want to set an alias name by issuing a GET request to
    one
    of the following
    devices
    endpoints for the
    NetOps Portal
    REST service:
    http://
    PC_host
    :8181/pc/center/webservice/devices/deviceItemId/<
    device_id>
    /components
    • device_id
      The identification number for the monitored device with which the component is associated.
    http://
    PC_host
    :8181/pc/center/webservice/devices/domainItemId/
    <domain_id>
    /<device_IP>/components
    • 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 components 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>
    /setComponentNameAlias
    • device_id
      The identification number for the device item with which the component is associated.
    http://
    PC_host
    :
    8181
    /pc/center/webservice/devices/domainItemId/<
    domain_id>
    /<
    device_IP>
    /setComponentNameAlias
    • domain_id
      The identification number for the IP domain that the device is in.
    • device_IP
      The IP address of the device.
    Body:
    <deviceComponents>
    <deviceComponent>
    <itemId>
    component_ item_ id
    </itemId>
    <nameAlias>
    alias_for_component
    </nameAlias>
    </deviceComponent>
    ...
    </deviceComponents>
    Example:
    <deviceComponents>
    <deviceComponent>
    <itemId>164</itemId>
    <nameAlias>Et0 - alias</nameAlias>
    </deviceComponent>
    <deviceComponent>
    <itemId>165</itemId>
    <nameAlias>Se0 - alias</nameAlias>
    </deviceComponent>
    </deviceComponents>
    • component_ item_ id
      The identifier of the component for which you want to set an alias name.
    • alias_for_component
      The alias name that you want to set for the component.