Maintenance Indicators Web Service

Local admin users can use web services to create maintenance indicators. Maintenance indicators represent times when maintenance is occurring. After you schedule maintenance indicators, views indicate maintenance with shading.
Local admin users can use the
maintenanceindicators
web services to create maintenance indicators. Maintenance indicators represent times when maintenance is occurring. After you schedule maintenance indicators, views indicate maintenance with shading.
Maintenance indicators apply to all the devices and components in a site group. When the associated site group is selected in the context, maintenance indicators appear in applicable views as you navigate between dashboards. The subtitle of each view indicates whether maintenance indicators apply to the view.
Subgroups do not directly inherit maintenance indicators from the site groups. Associate the maintenance indicators with each relevant subgroup. However, when rendering views, these filters apply to all items based on the selected site group. The filters of the selected site group apply to all items in that group and in any subgroups. When you change the selected site group to a subgroup, the filters of the parent group are no longer applicable.
Reference groups inherit associated maintenance indicators from the original site group.
Maintenance Indicators Web Service Operations
Issue the following call to see the available operations for the maintenance indicators web service:
http://
PC_host
:8181/pc/center/rest/maintenanceindicators/documentation
Operations
  • PC_host
    :8181
    Specify the
    NetOps Portal
    IP address. 8181 is the required port.
  • get list
    Get a list of all maintenance indicators definitions for the authenticated user.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/
    HTTP method:
    GET
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd 
  • add
    Create a maintenance indicators definition from the provided XML.
    URL:
    http://PC_host:8181/pc/center/webservice/maintenanceindicators/tenantId/
    {tenantId}
    • {tenantId}
      Specify the ID for the desired tenant.
    HTTP method:
    POST
    XSD for the provided XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd
     
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd 
  • delete
    Delete the maintenance indicators definition using the specified ID.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/id/
    {maintenanceIndicatorId}
    • {maintenanceIndicatorId}
      Specify the ID for the desired maintenance indicator.
    HTTP method:
    DELETE
    Return type is a string.
  • get
    Get a specific maintenance indicators definition.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/id/
    {maintenanceIndicatorId}
    HTTP method: 
    GET
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd
  • get id names
    Return a list of identifiers that can be used in other methods to identify certain objects. For this web service, an empty list is returned.  
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/idNames
    HTTP method:
    GET
  • get list for tenant
    Get a list of all maintenance indicators definitions for the specified tenant.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/tenantId/
    {tenantId}
    • {tenantId}
      Specify the ID for the desired tenant.
    HTTP method:
    GET
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd
     
  • update
    Update the specified maintenance indicators definition from the provided XML.
    URL:
    http://
    PC_host
    :8181/pc/center/webservice/maintenanceindicators/tenantId/
    {tenantId}
    /id/
    {maintenanceIndicatorId}
    HTTP method:
    PUT
    XSD for the provided XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd 
    XSD for the returned XML:
    http://
    PC_host
    :8181/pc/center/rest/maintenanceindicators/xsd
     
Create Maintenance Indicators Using Web Services
Use any REST client to create and configure maintenance indicators using the maintenance indicators 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/maintenanceindicators/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:
    <MaintenanceIndicator>
       <Name>Maintenance Indicator Name</Name>
       <Description> Maintenance Indicator Description</Description>
       <MaintenanceYear>Year</MaintenanceYear>
       <MaintenanceMonth>Month</MaintenanceMonth>
       <MaintenanceDay>Day</MaintenanceDay>
       <StartHour>StartHour</StartHour>
       <EndHour>EndHour</EndHour>
       <SelectedSites>
          <SelectedSite>SiteID</SelectedSite>
          <SelectedSite>SiteID</SelectedSite>
       </SelectedSites>
    </MaintenanceIndicator>
     
    • Name
      Specify a name for this maintenance indicators definition.
    • Description
      Specify a description for this maintenance indicators definition.
    • MaintenanceYea
      r
      Specify a four-digit year for when the related maintenance takes place.
    • MaintenanceMonth
      Specify a month (1 - 12) for when the related maintenance takes place.
    • MaintenanceDay
      Specify a day (1 - 31) for when the related maintenance takes place.
    • StartHour
      Specify an hour (0 - 23) for when the related maintenance takes place.
    • EndHour
      Specify an hour (1 - 24) for when the related maintenance takes place.
    • SelectedSites
      (Optional) Specify one or more tags containing the site IDs to assign this maintenance indicators definition to. To create a definition without sites that are assigned, omit this parameter
  7. Replace any values with the values that you want to use for the new maintenance indicators.
    For example, supply the following parameters, where 3569 is the site ID for the
     Framingham
     site:
    <MaintenanceIndicator>
       <Name>Framingham router maintenance</Name>
       <Description>Upgrade of the network for framingham</Description>
       <MaintenanceYear>2016</MaintenanceYear>
       <MaintenanceMonth>8</MaintenanceMonth>
       <MaintenanceDay>5</MaintenanceDay>
       <StartHour>19</StartHour>
       <EndHour>22</EndHour> 
       <SelectedSites>
          <SelectedSite>510</SelectedSite>
          <SelectedSite>511</SelectedSite>
       </SelectedSites>
    </MaintenanceIndicator>
  8. Run the method.
  9. Repeat the preceding steps until you have created as many maintenance indicators as you require.