search cancel

How to get Spectrum Model Attributes via REST API


Article ID: 15027


Updated On:


CA Spectrum DX NetOps


There are many ways to find a model's attributes (such as through the OneClick interface, or via the vnmsh command line), however, these usually list out all the attributes of the one chosen model. The REST API can offer a more granular approach to finding the values of various model attributes.

How can the Spectrum REST API be used to specify individual or multiple attributes and get their values from targeted models?


Release: 20.2.x


A RESTful POST request can be used to achieve this by creating an XML body with the desired requests targeting the individual Model_Handle (attribute 0x129fa) of each model you wish to get attributes from.. For example, to get attributes such as Network_Address (0x12d7f), Model_Name (0x1006e) or Modeltype_Name (0x10000), you would issue a POST request with the following body (where a separate "MODEL_HANDLE" value is specified for each model whose values are required:


<?xml version="1.0" encoding="UTF-8"?> 


<rs:model-request throttlesize="1000" 



xsi:schemaLocation=" ../../../xsd/Request.xsd"> 



<rs:model mh=“MODEL_HANDLE” />

<rs:model mh=“MODEL_HANDLE” />




<rs:requested-attribute id="0x12d7f"/> 

<rs:requested-attribute id="0x1006e"/> 

<rs:requested-attribute id="0x10000"/> 



Additional Information

Please reference the "Web Services API Reference" section of the documentation for more information.