cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
515
Views
0
Helpful
2
Replies

Obtaining Fabric interconnect list and data in Intersight via API

JuanJacobo
Cisco Employee
Cisco Employee

Hello.

I am fairly new to Intersight and need to write a python script that transverses through the UCS fabric interconnects present in every domain , for each of them to obtain the relevant data and specific locators to be able to issue a "show version" command via cli and later create a .txt report includes the list of domains and fabric interconnects that didn´t passed certain filter.

JuanJacobo_0-1714666552332.png

I would appreciate any help to search for the API endpoints that could prove useful for this endeavor or any other suggestion related to the procedure I described.

 

 

Thanks.

 

 

 

 

 

 

 

 

2 Replies 2

Sandeep Kumar
Cisco Employee
Cisco Employee
To get information related to Fabric Interconnects, you can make an API call to network/ElementSummaries. See below for URL.
You can also use browser developer tools > Network Tab to view API calls being made by Intersight GUI to learn. You can find API documentation here: https://intersight.com/apidocs

URL:

Query Parameters:
$inlinecount: allpages
$skip: 0
$top: 10
$filter: SwitchType eq FabricInterconnect
$orderby: Name asc
$expand: RegisteredDevice
$select: Tags,PermissionResources,Name,AlarmSummary,OutOfBandIpAddress,Model,NumExpansionModules,BundleVersion,FirmwareVersion,Serial,UserLabel,AdminEvacState,RegisteredDevice,SwitchType,SwitchId,NumEtherPorts,NumFcPorts,NumEtherPortsConfigured,NumFcPortsConfigured,NumEtherPorts,NumFcPorts,DeviceMoId,ManagementMode,Presence,Status,SourceObjectType,Dn,AdminEvacState

Complete URL: URL + Query Parameters


cgascoig
Cisco Employee
Cisco Employee

You also may be able to skip writing the python script entirely. If you install isctl you can do something like this:

$ isctl get network elementsummary --filter "SwitchType eq 'FabricInterconnect'" -o custom-columns=Name:.Name,FirmwareVersion:.FirmwareVersion
--------------------------  --------------------
                     Name       FirmwareVersion
--------------------------  --------------------
      anzsp-mel03-hx FI-A       5.0(3)N2(4.21g)
      anzsp-mel03-hx FI-B       5.0(3)N2(4.21g)
       se-cis-5-6332 FI-A       5.0(3)N2(4.23d)
       se-cis-5-6332 FI-B       5.0(3)N2(4.23d)
       anzsp-nsd5-hx FI-A       5.0(3)N2(4.21g)
       anzsp-nsd5-hx FI-B       5.0(3)N2(4.21g)
         MEL-DC4-UCS FI-A       5.0(3)N2(4.23b)
         MEL-DC4-UCS FI-B       5.0(3)N2(4.23b)
        ANZ-SE-DC-HX FI-A       5.0(3)N2(4.21j)
        ANZ-SE-DC-HX FI-B       5.0(3)N2(4.21j)
           Hyperflex FI-A       5.0(3)N2(4.23d)
           Hyperflex FI-B       5.0(3)N2(4.23d)
    nsd5-static-ucsx FI-B         9.3(5)I42(3c)
    nsd5-static-ucsx FI-A         9.3(5)I42(3c)
          MEL-IMM-FI FI-A         9.3(5)I42(3f)
          MEL-IMM-FI FI-B         9.3(5)I42(3f)
        nsd5-dc-ucsx FI-A         9.3(5)I42(3d)
        nsd5-dc-ucsx FI-B         9.3(5)I42(3d)
--------------------------  --------------------

 Or you can output to a CSV file like this:

$ isctl get network elementsummary --filter "SwitchType eq 'FabricInterconnect'" -o csv > out.csv

Review Cisco Networking for a $25 gift card