How to get list of interfaces with IDs and Alias name filtered by specific characters via REST

Document ID : KB000095798
Last Modified Date : 15/05/2018
Show Technical Document Details
Question:
How can we get a list of interfaces with their IDs and Alias name filtered by specific characters in the name, for example '-3G' ?  

A whole list of items is returned by POST method with RESTclient using this XML:

<?xml version='1.0'?>
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
 <Filter>
 <Or>
 <Port.Alias type="GREATER">0</Port.Alias >
 </Or>
 </Filter>
 <Select use="exclude" isa="exclude">
  <Port use="exclude">
 <Alias use="include"/>
 </Port>
 </Select>
</FilterSelect>

But couldn't find how to use values like GREATER, ISLIKE, CONTAINS, etc to filter the results as needed.

For example when using the following line in the XML:
<Port.Alias type="CONTAINS"={-3G}</Port.Alias >

it only returns an empty list:
<PortList />


 
Environment:
CA Performance Management 3.5.0
Answer:
This is the list of base comparisons we do in Data Aggregator via REST: 

<xs:enumeration value="LESS"/> 
<xs:enumeration value="LESS_OR_EQUAL"/> 
<xs:enumeration value="GREATER"/> 
<xs:enumeration value="GREATER_OR_EQUAL"/> 
<xs:enumeration value="EQUAL"/> 
<xs:enumeration value="CONTAINS"/> 
<xs:enumeration value="STARTS_WITH"/> 
<xs:enumeration value="ENDS_WITH"/> 
<xs:enumeration value="REGEX"/> 
<xs:enumeration value="IS_NULL"/> 

Note that 'Port.Alias' is the ifAlias we read from the device, not the Interface Name Alias that exists in CA Performance Center. 

To filter against the item's Alias read off the device, should be able to use this, looking for '-3G' in the name: 
<Port.Alias type="CONTAINS">-3G</Port.Alias> 

 
Additional Information:
Starting from CAPM 3.5, we added the ability to use OpenAPI to access the Interface Name Alias (synced down to Data Aggregator ) via the ETL table. 

This is a new feature added in CA PM 3.5 - refer to the CA Performance Management 3.5.0 documentation: 
https://docops.ca.com/ca-performance-management/3-5/en/release-notes/new-features-and-enhancements#NewFeaturesandEnhancements-OpenAPIEnhancements 
... 
OpenAPI Enhancements 
The following enhancements apply to the OpenAPI: 

You can now use the select: AlternateName token in the OpenAPI QueryBuilder to query on the alias of a managed item. 

Note: After you add an alias to a managed item in Performance Center, it is available for OpenAPI queries with some delay due to ETL job scheduling. 
...