I need a way to retrieve all modules for all models (devices) from Spectrum Landscape in a single API call using curl?
Dx NetOps Spectrum 23.3.3
1. Go to <SPECROOT>/RestfulExamples/xml/Models
2. Changed the file to look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!--
CA Technologies, Inc.
One CA Plaza
Islandia, NY 11749 USA
Copyright (c) 2012 CA Technologies, Inc.
All rights reserved.
IN NO EVENT SHALL CA TECHNOLOGIES INCORPORATED BE LIABLE FOR
ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES
WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT
OF OR RELATED TO THIS SOFTWARE, EVEN IF CA TECHNOLOGIES INCORPORATED
HAS BEEN ADVISED OF, KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF
SUCH DAMAGES.
-->
<rs:model-request throttlesize="10"
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-file>
topo/config/search-modules-all-chassis-criteria.xml
</rs:search-criteria-file>
</rs:models-search>
</rs:target-models>
<rs:requested-attribute id="0x1006e" />
<rs:requested-attribute id="0x10000" />
</rs:model-request>
3. Run the following command:
curl -X POST -v -k -H 'Content-Type: application/xml' [email protected] -u spectrum:spectrum "https://<OCS>:<PORT>/spectrum/restful/models"