Showing posts with label API. Show all posts
Showing posts with label API. Show all posts
Wednesday, June 29, 2016
Using Spark to monitor device availability
This is another use case I used Spark in my lab, to check the availability of my lab devices. When there is outage, the chatbot will alert me proactively so that I can check and troubleshoot the issue earlier rather than later.
Labels:
API,
Cisco,
Network Management,
Restful API,
scripting,
Spark,
use cases
Thursday, June 23, 2016
UDS API - Query User info
You can query the user information with the UDS API, it is a HTTP GET request and if the LDAP search UDS proxy feature is enabled on 11.5, you can use it to query the LDAP users with this API.
This is the HTTP GET request that I've used for the below screen capture:
https://10.1.90.11/cucm-uds/users?name=aeinstein
This is the HTTP GET request that I've used for the below screen capture:
https://10.1.90.11/cucm-uds/users?name=aeinstein
Saturday, June 18, 2016
Cisco Spark Bot + Energywise Demo
I have developed a very basic bot and one of the use case that was developed is the energy control use case. I can talk to my bot and ask the bot to switch off / on the energy of my Cisco DX650 phones using the energywise command of the Cisco switch.
This bot is based on the Flint project in Github, for more information please check it out here:
https://github.com/nmarus/flint
This bot is based on the Flint project in Github, for more information please check it out here:
https://github.com/nmarus/flint
Labels:
API,
Bot,
Cisco,
Energywise,
Programming,
Spark
Thursday, February 12, 2015
Nexus 9000 Standalone mode eNXOS - New Feature Walkthrough
I have just got two new Nexus 9396PX in my lab, and let's quickly walkthrough some unique features and capabilities on N9K eNXOS.
Comparing with Nexus 7K and 5K which have 2 separate images (kickstart and system), N9K eNXOS has only a single image file.
Although there is VDC command available, only single VDC is supported.
You can enable Linux bash shell access by issuing command "feature bash-shell"
You can also access to Python shell to do some programming and automation to the switch using python scripts.
Moreover, you can access to Broadcom shell for low level troubleshooting
There is a built in tcpdump-like sniffer, this example is simply sniff the traffic of my OOB mgmt port.
N9K standalone offers RESTful NXAPI as the northbound API, you can enable it by using command "feature nxapi"
then access the page http://<your 9K address> from your browser
Then you will see this Developer sandbox, which allows you to test the API calls and let you know the syntax and format:
For example you can submit a "show version" command and it will show the corresponding JSON request format and response, it saves you time to look at documentation to understand the request and response format.
And you can even submit bash shell command via NXAPI, it is really powerful.
Saturday, April 26, 2014
Cisco Telepresence - sending DTMF using API and cURL
Very similar to my previous post:
http://pandaeatsbamboo.blogspot.hk/2014/04/making-cisco-telepresence-calls-using.html
We can send DTMF using CURL + TC firmware API. This is useful when you want to join a multipoint video call which has password protected, and you want to automate that.
You can use the same curl command in my previous post, and for the xml file content, this is the sample to use while you are in call:
http://pandaeatsbamboo.blogspot.hk/2014/04/making-cisco-telepresence-calls-using.html
We can send DTMF using CURL + TC firmware API. This is useful when you want to join a multipoint video call which has password protected, and you want to automate that.
You can use the same curl command in my previous post, and for the xml file content, this is the sample to use while you are in call:
<Command><DTMFSend command="True"><DTMFString>000000#</DTMFString></DTMFSend></Command>
Labels:
API,
Cisco,
CURL,
DTMF,
Telepresence
Thursday, April 24, 2014
Making Cisco Telepresence calls using API and cURL
For those EX, SX, MX and C-series codec which are running TC firmware, you can use the below method to make and disconnect call with CURL using its XML API. In my lab environment I am using TC7.1, however earlier release will also work. My video endpoint IP address is 192.168.24.6 and going to make a phone call to number 8334.
Make call
[root@ns3 ~]# curl -k -u admin:panda123 -H "Content-type: text/xml;" -d @ex.xml http://192.168.24.6/formputxml?xmldoc
Output:
<Command><DialResult status="OK" item="1">
<CallId item="1">7</CallId>
<ConferenceId item="1">6</ConferenceId>
</DialResult>
</Command>
<Command><DialResult status="OK" item="1">
<CallId item="1">7</CallId>
<ConferenceId item="1">6</ConferenceId>
</DialResult>
</Command>
ex.xml file content:
<Command><Dial command="True"><Number>8334</Number><Protocol>h323</Protocol></Dial></Command>
Disconnect All calls
[root@ns3 ~]# curl -k -u admin:panda123 -H "Content-type: text/xml;" -d @ex2.xml http://192.168.24.6/formputxml?xmldoc
Output:
<Command><DisconnectAllResult status="OK" item="1"/>
ex2.xml file content:
<Command><Call command="True"><DisconnectAll></DisconnectAll></Call></Command>
Labels:
API,
Cisco,
Collaboration,
CURL,
TC,
Telepresence
Subscribe to:
Posts (Atom)










