def query(self, data, silentMode=False): """ Description Query for objects using filters. Paramater silentMode: (bool): True: Don't display any output on stdout. Notes Assuming this is a BGP configuration, which has two Topologies. Below demonstrates how to query the BGP host object by drilling down the Topology by its name and the specific the BGP attributes to modify at the BGPIpv4Peer node: flap, downtimeInSec, uptimeInSec. The from '/' is the entry point to the API tree. Notice all the node. This represents the API tree from the / entry point and starting at Topology level to the BGP host level. Notes Use the API Browser tool on the IxNetwork GUI to view the API tree. data: {'from': '/', 'nodes': [{'node': 'topology', 'properties': ['name'], 'where': [{'property': 'name', 'regex': 'Topo1'}]}, {'node': 'deviceGroup', 'properties': [], 'where': []}, {'node': 'ethernet', 'properties': [], 'where': []}, {'node': 'ipv4', 'properties': [], 'where': []}, {'node': 'bgpIpv4Peer', 'properties': ['flap', 'downtimeInSec', 'uptimeInSec'], 'where': []}] } Requirements self.waitForComplete() Examples response = restObj.query(data=queryData) bgpHostAttributes = response.json()['result'][0]['topology'][0]['deviceGroup'][0]['ethernet'][0]['ipv4'][0]['bgpIpv4Peer'][0] # GET THE BGP ATTRIBUTES TO MODIFY bgpHostFlapMultivalue = bgpHostAttributes['flap'] bgpHostFlapUpTimeMultivalue = bgpHostAttributes['uptimeInSec'] bgpHostFlapDownTimeMultivalue = bgpHostAttributes['downtimeInSec'] restObj.configMultivalue(bgpHostFlapMultivalue, multivalueType='valueList', data={'values': ['true', 'true']}) restObj.configMultivalue(bgpHostFlapUpTimeMultivalue, multivalueType='singleValue', data={'value': '60'}) restObj.configMultivalue(bgpHostFlapDownTimeMultivalue, multivalueType='singleValue', data={'value': '30'}) """ url = self.sessionUrl+'/operations/query' reformattedData = {'selects': [data]} response = self.post(url, data=reformattedData, silentMode=silentMode) self.waitForComplete(response, url+'/'+response.json()['id'], silentMode=silentMode) return response