How do I get list of models in a universe container via rest?
Release : 21.2
In this example, I have a network container called “issues” with just 1 device called "cpfw".
<?xml version="1.0" encoding="UTF-8"?>
<rs:model-request throttlesize="5"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd">
<rs:target-models>
<rs:models-search>
<rs:search-criteria xmlns="http://www.ca.com/spectrum/restful/schema/filter">
<child-models>
<filtered-models>
<and>
<equals>
<model-type>0x1002d</model-type> <!-- network mtype -->
</equals>
<has-substring-ignore-case>
<attribute id="AttributeID.MODEL_NAME">
<value>issues</value> <!-- ModelName -->
</attribute>
</has-substring-ignore-case>
</and>
</filtered-models>
<relation>0x10002</relation> <!-- 0x10002 collects relation-->
</child-models>
</rs:search-criteria>
</rs:models-search>
</rs:target-models>
<rs:requested-attribute id="0x1006e" />
</rs:model-request>
Output from the above
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<model-response-list total-models="1" throttle="1" error="EndOfResults">
<model-responses>
<model mh="0x1035918">
<attribute id="0x1006e">
cpfw
</attribute>
</model>
</model-responses>
</model-response-list>