DX NetOps

  • 1.  API - Retrieve firmware version of all devices

    Posted Nov 22, 2017 08:58 AM

    Hi all,

    I am trying to get through REST API in json or XML format some info of all the devices, including firmware version.

     

    The XML request I am trying is this:

    <?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-file>
                topo/config/search-devices-criteria.xml
             </rs:search-criteria-file>
          </rs:models-search>
       </rs:target-models>

       <!-- Name -->
       <rs:requested-attribute id="0x1006e" />
       <!-- Model -->
       <rs:requested-attribute id="0x10000" />
       <!-- Network Address -->
       <rs:requested-attribute id="0x12d7f" />
       <!-- Manufacturer -->
       <rs:requested-attribute id="0x10032" />
    </rs:model-request>

     

    I found this thread Tuesday Tip: Adding firmware version column to locater search results list where it explains how to add firmware version column to locater search results list, buy I don't know how to translate it to the XML request.

     

    Any help would be appreciated.



  • 2.  Re: API - Retrieve firmware version of all devices

    Posted Nov 22, 2017 09:11 AM

    Well, sorry, I'm new at this community.

     

    I have just found this thread Query Component Detail Notes where I could find out the attribute 0x12de0 to retrieve the firmware. I supposed this attribute only have value assigned for certain models.

     

    Anyway, could anyone confirm the request I posted before, adding attribute 0x12de0, is correct?

     

    Thank you very much.



  • 3.  Re: API - Retrieve firmware version of all devices

    Broadcom Employee
    Posted Nov 27, 2017 05:59 PM

    Dear cc-mfoxarr ,

    It looks like you're talking about an issue of CA Spectrum, but here is community of CA API Management.

    That's why no one can understand your question.

    You may move your question to the right forum.

     

    Regards,

    Mark



  • 4.  Re: API - Retrieve firmware version of all devices

    Broadcom Employee
    Posted Nov 28, 2017 09:43 AM

    Hi Miguel,

     

    I have moved this posting to the CA Spectrum community to ensure you receive the assistance you need with this product.



  • 5.  Re: API - Retrieve firmware version of all devices
    Best Answer

    Broadcom Employee
    Posted Dec 05, 2017 05:36 PM

    The attribute that contains the firmware version is 0x12de0. You could use the following request to get the firmware version for all devices:

     

    http://localhost/spectrum/restful/devices?attr=0x1006e&attr=0x12d7f&attr=0x12de0

     

    0x10063 = Model Name

    0x12d7f =  Network address

    0x12de0 = Firmware version.

     

    This is a GET request. The response will look something like the following:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <model-response-list error="EndOfResults" throttle="1" total-models="1" xmlns="http://www.ca.com/spectrum/restful/schema/response">
    <model-responses>
    <model mh="0x800006c">
    <attribute id="0x1006e">cis7505-96.11.ca.com</attribute>
    <attribute id="0x12d7f">138.42.96.11</attribute>
    <attribute id="0x12de0">12.4(25)</attribute>
    </model>
    </model-responses>
    </model-response-list>

     

    Hope that helps.

     

    Chris