How to have multiple AND filter statements in a REST filter select
search cancel

How to have multiple AND filter statements in a REST filter select

book

Article ID: 415570

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

I'm trying to run an API query: https://xxxxx:8582/rest/devices/manageable/filtered/

 

XML payload 

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
        <ManageableDevice.SNMPProfileID type ="EQUAL">2026514</ManageableDevice.SNMPProfileID>
    </Filter>
</FilterSelect>
 
is valid, but I am getting a 413 back, I assume because there are too many devices. How would I do an  AND like this (which is not valid)
 
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
    <Filter>
        <ManageableDevice.SNMPProfileID type ="EQUAL">2026514</ManageableDevice.SNMPProfileID>
        <IPDomainMember.IPDomainID type="EQUAL">3361820</IPDomainMember.IPDomainID>
    </Filter>
</FilterSelect>

Environment

DxNetOps Performance Management any version

Resolution

The <AND> tag allows you to use multiple filter statements
 
Here is an example
 
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">

 

    <Filter>

<And>

        <ManageableDevice.SNMPProfileID type ="EQUAL">2026514</ManageableDevice.SNMPProfileID>

 

        <IPDomainMember.IPDomainID type="EQUAL">3361820</IPDomainMember.IPDomainID>

</And>

    </Filter>

 

</FilterSelect>