Alarm Attributes Web Service

Local admin users can use web services to create alarm attributes. You can create them for a specific tenant or for all tenants (global).
Local admin users can use the
alarmattributes
web service to create alarm attributes. You can create them for a specific tenant or for all tenants (global).
You can create the same attribute at the tenant level and the global level. The tenant level attribute applies to the tenant user and the global level attribute applies only to all other tenant users.
Do not manage external attributes using these web services. External attributes directly correspond to specific MIB variables in
DX NetOps Spectrum
.
For more information, see Alarms View.
Alarm Attributes Web Service Operations
Issue the following call to see the available operations for the
alarmattributes
web service:
http://
PC_host
:8181/pc/center/rest/alarmattributes/documentation
Operations
  • PC_host
    :8181
  • Specifies the
    NetOps Portal
    host name. 8181 is the required port.
  • delete
    Delete the attribute using the specified ID.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/tenantId/
    {tenantId}
    /attributeId/
    {attributeId}
    • {tenantId}
      The id for the desired tenant
    • {attributeId}
      The hexadecimal id of the alarm attribute
    HTTP method:
    DELETE
    Return type is a string.
  • delete global
    Delete the global attribute using the specified ID.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/global/attributeId/
    {attributeId}
    • {attributeId}
      The hexadecimal id of the alarm attribute
    HTTP method:
    DELETE
    Return type is a string.
  • get id names
    Return an empty list. In other web services, it can potentially return a list of identifiers that can be used in other methods to identify certain objects.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/idNames
    HTTP method:
    GET
  • get list for tenant
    Get a list of all attribute definitions for the specified tenant.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/tenantId/
    {tenantId}
    • {tenantId}
      The id for the desired tenant
    HTTP method:
    GET
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
  • add or update
    Add or update an attribute for the specified tenant.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/tenantId/
    {tenantId}
    • {tenantId}
      The id for the desired tenant
    HTTP method =
    POST
    XSD for the provided XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
  • get global list
    Get a list of all global attribute definitions.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/global
    HTTP method:
    GET
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
  • add or update global
    Add or update a global attribute.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/global
    HTTP method =
    POST
    XSD for the provided XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/alarmattributes/xsd
Create Alarm Attributes Using Web Services
Use any REST client to create and configure alarm attributes using the alarm attributes web service.
Follow these steps:
  1. Set up a REST client with a connection to the
    NetOps Portal
    server.
  2. Use the following format for the URL in the REST client:
    http://
    PC_host
    :8181/pc/center/webservice/alarmattributes/tenantId/8
    8 is the ID for the Default Tenant.
  3. Select
    POST
    for the
    HTTP Method
    .
  4. Provide a valid Username and Password for a user account that has global administrator access to
    NetOps Portal
    .
  5. Select
    'application/xml'
    as the
    'Body Content-type'
    .
  6. Add the following XML within the
    Body
    text section:
    <AlarmAttribute>
    <AttributeID>
    HEX_ID
    </AttributeID>
    <Name>
    Attribute_Name
    </Name>
    <Description>
    Attribute_Description
    </Description>
    <Type>
    Value_Type
    </Type>
    <AddAsFilter>true</AddAsFilter>
    <AddAsColumn>true</AddAsColumn>
    </AlarmAttribute>
    • AttributeID
      Specify the hexadecimal ID of the alarm attribute.
    • Name
      Specify a name for this alarm attribute.
    • Description
      Specify a description for this alarm attribute.
    • Type
      Specify one of the following allowable types:
      • STRING
        A String field, for example, the Device Name
      • BOOLEAN
        A Boolean value, for example, Acknowledged
      • ADDRESS_RANGE
        An IP address field, for example, the IP Address
      • INTEGER
        A numeric value, for example, Number of Occurrences
      • HEX
        A hexadecimal value, for example, Cause Code
      • OCTET_STRING
        A string value that is treated as a numeric value
    • AddAsFilter
      Specify whether to add the attribute to the filter list.
      Default:
      true
    • AddAsColumn
      Specify whether to add the attribute as a column in an Alarm view. The column is hidden by default.
      Default:
      true
  7. Replace any values with the values that you want to use for the new alarm attribute.
    Example:
    <AlarmAttribute>
    <AttributeID>0x129e7</AttributeID>
    <Name>Topology Model Name</Name>
    <Description>The Topology Model Name String</Description>
    <Type>STRING</Type>
    <AddAsFilter>true</AddAsFilter>
    <AddAsColumn>true</AddAsColumn>
    </AlarmAttribute>
  8. Run the method.
  9. Repeat the preceding steps until you have created as many alarm attributes as you require.