Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
lionx
Helper I
Helper I

How to get data from Cisco Switches?

Hi everyone,

I am trying to find out a way for getting data from Cisco Switches, but there is not much information for this.

I'm not sure whether I can create a data gateway for this.

Would you give me any solutions or suggestions?

I'm really appreciate your time and support.

3 REPLIES 3
amitchandak
Super User
Super User

@lionx , is available via rest API or some other method?

Hi @amitchandak 

I have found that I can access data I need through Cisco Rest API. I have set up and tested the API. The API work well when I try query with Curl. The syntax as follows:

curl -X GET https://30.10.543.65/api/v2/nodes -H "Accept: application/json" -H "Authorization: Bearer eyJwMyYiJ9.eyJpclciI6I30.lkAwbsfmNzA"

 

Now I try to create a Power Query Connector using Json Web Token (JWT) for authentication. The Curl snippet for query data is:
curl -k -H "Authorization: Bearer SIGNED_JWT" "https://30.10.543.65/api/v2/nodes/?fields=/system-state/basic&page=0&size=20&sort=ip,asc..."

 

However, I don't know how to work with JWT Authentication in Power Query. would you help me with this please? My power query connector starts as follows:

 

// This file contains your Data Connector logic
section CiscoSwitch;

[DataSource.Kind="CiscoSwitch", Publish="CiscoSwitch.Publish"]
shared CiscoSwitch.Contents = Web.Contents("https://30.10.543.65", [ApiKeyName="api_key"])

// Data Source Kind description
CiscoSwitch = [
Authentication = [
// Key = [],
// UsernamePassword = [],
// Windows = [],
Implicit = []
],
Label = Extension.LoadString("DataSourceLabel")
];

 

 

 

 

 

@amitchandak  Thank you for your response.

I have seen any available API even I have tried to get through de API Documents from Cisco Cisco API Documentation - Cisco DevNet

Are there any other solutions like directly connecting to database? 

What I need to do is extracted the data "Resorce Utilization" & "System Health" from Cisco Switch 

lionx_0-1669156194954.png

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.