Get list of ports/interfaces for each device via Rest API
search cancel

Get list of ports/interfaces for each device via Rest API

book

Article ID: 429508

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

This article explains the Rest API based approach to filter a list of ports/interface per device

Environment

All Supported NetOps Performance Management releases

Resolution

Use the following REST API based query to obtain the desired result:

# curl -u <username>:<password> --header "Content-Type: application/xml" --request POST --data '
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
     <Filter>
          <DeviceComponent.DeviceItemID type="CONTAINS"><Enter DeviceID here></DeviceComponent.DeviceItemID>
     </Filter>
     <Select use="exclude" isa="exclude">
          <Item use="include">
                   <Name use="include"/>
          </Item>
     </Select>
</FilterSelect>' --url "<Protocol>://<DA Host>:<Port>/rest/ports/filtered?pretty=true"