heep高等英语教学网://1.189.33.51:134/

 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
下载积分:499
内容提示:http代理
文档格式:TXT|
浏览次数:8|
上传日期: 17:52:10|
文档星级:
全文阅读已结束,如果下载本文需要使用
 499 积分
下载此文档
该用户还上传了这些文档
关注微信公众号Cisco Edge 300 Series Switch Software Configuration Guide, Release 1.6 - Configuring HTTP API [Cisco Edge Series] - Cisco
Cisco Edge 300 Series Switch Software Configuration Guide, Release 1.6
Book Contents
Book Contents
Available Languages
Download Options
Book Title
Cisco Edge 300 Series Switch Software Configuration Guide, Release 1.6
Chapter Title
Configuring HTTP API
View with Adobe Reader on a variety of devices
Chapter: Configuring HTTP API
Chapter Contents
Configuring HTTP API
You can run an application either locally or remotely on the Cisco Edge 300 series switch to manage the switch by using HTTP API. Management of the switch consists of configuring the switch, monitoring the status, and installing and upgrading software.
The configuration of HTTP API for the Cisco Edge 300 series switch is supported from Release 1.5. This chapter explains each HTTP API including requests, replies, parameter restrictions, and error codes.
Note Curl is used as a sample tool to request APIs. 10.140.44.134 is used as a sample IP address of the Cisco Edge 300 series switch, and cisco123! is used as a sample admin password.
To configure the Cisco Edge 300 series switch by using HTTP API, see the following sections:
Use the commands in this section to configure the system API.
Note Curl is used as a sample tool to request APIs. 10.140.44.134 is used as a sample IP address of the Cisco Edge 300 series switch, and cisco123! is used as a sample admin password.
Example: set hostname to cisco
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&hostname& : &cisco&}' https://10.140.44.134/api/1.0/sys/hostname
{&success&:&true&,&updatedAt&:& 17:39:47&}
Parameter restrictions
The length of hostname should be 1 to 64 and the valid parameter set is {a-zA-Z0-9-_}, or 004 error is reported.
Example: get hostname
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/hostname
{&hostname&:&cisco&,&success&:&true&,&getAt&:& 17:44:37&}
Example: set log size to 20 MB
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&size&:&20&}'https://10.140.44.134/api/1.0/sys/log/size
{&success&:&true&,&updatedAt&:& 17:39:47&}
Parameter restrictions
The log size parameter should be an integer, in the range from 1 to 100, or 004 error is reported.
Example: get log size
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/log/size
{&size&:&20&,&success&:&true&,&getAt&:& 04:33:55&}
Example: delete all logs
curl -k -X DELETE -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/log
{&success&:&true&,&updatedAt&:& 08:24:08&}
Example: change the password of admin account from cisco123! to cisco123
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&account& : &cisco123&}' https://10.140.44.134/api/1.0/sys/account
{&success&:&true&,&updatedAt&:& 17:48:06&}
Parameter restrictions
The password cannot be empty and the valid parameter set is {a-zA-Z0-9~!@#$%^&*+=-_}, otherwise 004 error is reported. The password should follow the busy box linux password requirement, otherwise 005 error is reported.
003 error is reported if violated.
Example: set loginGui to enable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&loginGui& : &enable&}' https://10.140.44.134/api/1.0/sys/loginGui
{&success&:&true&,&updatedAt&:& 17:39:47&}
Parameter restrictions
Valid strings for loginGui: enable and disable. Otherwise, 004 error is reported.
Example: get login gui
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/loginGui
{&loginGui&:&enable&,&success&:&true&,&getAt&:& 19:17:41&}
Example: set resolution to 1080p
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&resolution& : &4&}' https://10.140.44.134/api/1.0/sys/resolution
{&success&:&true&,&updatedAt&:& 17:39:47&}
Parameter restrictions
The valid parameter set is number 1–9. Otherwise, 004 error is reported.
Example: get resolution
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/resolution
{&resolution&:&9&,&success&:&true&,&getAt&:& 08:55:27&}
Example: get hdmi information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/hdmi
{&hdmi&:& - Manufacturer ID: 0x294d\n - Product code : 0x9135\n - Sink name : HDMI TV\n - Sink size (WxH) : 80 x 45\nCurrent working mode:\n p@59.94\nSupported modes:\n - 720x480p60 \n -
\n - 720x480p59.94 \n - .94 \n - .94 \n - .94 \n\n&,&success&:&true&,&getAt&:& 08:41:33&}
Example: set bluetooth to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&bluetooth& : &on&}' https://10.140.44.134/api/1.0/sys/bluetooth
{&success&:&true&,&updatedAt&:& 17:39:47&}
Parameter restrictions
The valid parameter is on/off. Otherwise, 004 error is reported.
Example: get bluetooth
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/bluetooth
{&bluetooth&:&on&,&success&:&true&,&getAt&:& 19:43:08&}
Example: set language to 1
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&language& : &1&}' https://10.140.44.134/api/1.0/sys/language
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The valid parameter set is number 1-9. Otherwise, 004 error is reported.
Example: get language
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/language
{&language&:&1&,&success&:&true&,&getAt&:& 19:49:24&}
Example: set locale to &8&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&locale& : &8&}' https://10.140.44.134/api/1.0/sys/locale
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The valid parameter set is number 0-26. Otherwise, 004 error is reported.
Example: get locale
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/locale
{&locale&:&9&,&success&:&true&,&getAt&:& 20:13:31&}
Example: set NTP server to 202.120.2.101
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&ntpServer& : &ntp.sjtu.edu.cn&}' https://10.140.44.134/api/1.0/sys/ntpServer
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The parameter should be a valid IPv4 address or a valid domain name.
Example: get ntPServer
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/ntpServer
{&ntpServer&:&ntp.sjtu.edu.cn&,&success&:&true&,&getAt&:& 08:04:34&}
Example: set time
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&time& : & 17:20:20&}' https://10.140.44.134/api/1.0/sys/time
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The parameter should be in YYYY-MM-DD HH:MM:SS format. Otherwise, 004 error is reported.
Example: get time
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/time
{&time&:& 15:22:15&,&success&:&true&,&getAt&:& 06:22:15&}
N/A. 003 error is reported if it is requested.
Example: get CPU
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/cpu
{&cpu&:&CPU: 9% usr 0% sys 0% nic 90% idle 0% io 0% irq 0% sirq&,&success&:&true&,&getAt&:& 06:35:06&}
N/A. 003 error is reported if it is requested.
Example: get memory
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/memory
{&memory&:&Mem: 378112K used, 1310780K free, 0K shrd, 57188K buff, 155920K cached&,&success&:&true&,&getAt&:& 08:08:07&}
N/A. 003 error is reported if it is requested.
Example: get process
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/proc
{&proc&:&UID PID PPID C STIME TTY TIME CMD\nroot 1 0 0 10:57 ? 00:00:01 init \nroot 2 0 0 10:57 ? 00:00:00 [kthreadd]\nroot 3 2 0 10:57 ? 00:00:00 [migration\/0]\nroot 4 2 0 10:57 ? 00:00:03 [ksoftirqd\/0]\nroot 5 2 0 10:57 ? 00:00:00 [events\/0]\nroot 6 2 0 10:57 ? 00:00:00 [khelper]\nroot 9 2 0 10:57 ? 00:00:00 [kstop\/0]\nroot 134 2 0 10:57 ? 00:00:00 [kblockd\/0]\nroot 136 2 0 10:57 ? 00:00:00 [kacpid]\nroot 137 2 0 10:57 ? 00:00:00 [kacpi_notify]\nroot 216 2 0 10:57 ? 00:00:00 [ata\/0]\nroot 217 2 0 10:57 ? 00:00:00 [ata_aux]\nroot 218 2 0 10:57 ? 00:00:00 [ksuspend_usbd]\nroot 224 2 0 10:57 ? 00:00:00 [khubd]\nroot 227 2 0 10:57 ? 00:00:00 [kseriod]\nroot 229 2 0 10:57 ? 00:00:00 [kgameportd]\nroot 232 2 0 10:57 ? 00:00:00 [kmmcd]\nroot 283 2 0 10:57 ? 00:00:00 [pdflush]\nroot 284 2 0 10:57 ? 00:00:00 [pdflush]\nroot 285 2 0 10:57 ? 00:00:00 [kswapd0]\nroot 326 2 0 10:57 ? 00:00:00 [aio\/0]\nroot 337 2 0 10:57 ? 00:00:00 [nfsiod]\nroot 342 2 0 10:57 ? 00:00:00 [cifsoplockd]\nroot 343 2 0 10:57 ? 00:00:00 [cifsdnotifyd]\nroot 527 2 0 10:57 ? 00:00:00 [scsi_eh_0]\nroot 529 2 0 10:57 ? 00:00:00 [scsi_eh_1]\nroot 533 2 0 10:57 ? 00:00:00 [mtdblockd]\nroot 579 2 0 10:57 ? 00:00:00 [kpsmoused]\nroot 588 2 0 10:57 ? 00:00:00 [hid_compat]\nroot 612 2 1 10:57 ? 00:06:35 [Glob_Spectra]\nroot 618 2 0 10:57 ? 00:02:18 [nandflush]\nroot 628 2 0 10:57 ? 00:00:00 [krfcommd]\nroot 631 2 0 10:57 ? 00:00:00 [rpciod\/0]\nroot 664 2 0 10:57 ? 00:00:00 [scsi_eh_2]\nroot 665 2 0 10:57 ? 00:00:00 [usb-storage]\nroot 672 2 0 10:57 ? 00:00:06 [kjournald]\nroot 935 1 0 10:57 ? 00:00:00 udevd -d\nroot
10:57 ? 00:00:00 [SEC int]\nroot
10:57 ? 00:00:35 [Clock_ISR]\nroot
10:57 ? 00:00:00 \/bin\/cdp eth0 start\nroot
10:57 ? 00:03:14 \/bin\/gdl_server blender_config 1\nroot
10:57 ? 00:00:00 [VidDec_hal_pars]\nroot
10:57 ? 00:00:00 [VidDec_hal_deco]\nroot
10:57 ? 00:00:00 [VidPProc_ISR]\nroot
10:57 ? 00:00:00 [VidPProc_IO]\nroot
10:57 ? 00:00:24 [VidRend_IO]\nroot
10:57 ? 00:00:00 [VidRend_IO]\nroot
10:57 ? 00:01:18 [Audio_Rend_ISR]\nroot
10:57 ? 00:00:27 [Audio_Timing]\nroot
10:57 ? 00:00:08 [Audio_Pipe_Mgr]\nroot
10:57 ? 00:00:00 [Audio_DSP0_ISR]\nroot
10:57 ? 00:00:00 [Audio_DSP1_ISR]\nroot
10:58 ? 00:00:00 \/bin\/konfd\nroot
10:58 ? 00:00:00 php-fpm: master process (\/usr\/local\/cisco\/php\/etc\/php-fpm.conf)\nroot
10:58 ? 00:00:02 php-fpm: pool root \nroot
10:58 ? 00:00:02 php-fpm: pool root \nroot
10:58 ? 00:00:00 nginx: master process \/usr\/local\/cisco\/nginx\/sbin\/nginx\nroot
10:58 ? 00:00:14 nginx: worker process \nroot
10:58 ? 00:00:00 \/usr\/local\/cisco\/\/sbin\/cupsd -C \/usr\/local\/cisco\/\/etc\/cups\/cupsd.conf\nroot
10:58 ? 00:00:00 \/usr\/local\/cisco\/sbin\/xinetd\nroot
10:58 ? 00:00:19 \/usr\/local\/cisco\/sbin\/snmpd\nroot
10:58 ? 00:00:00 \/sbin\/sshd\nroot
10:58 ? 00:00:16 \/usr\/local\/cisco\/sbin\/cron\nroot
10:58 ? 00:00:00 \/usr\/local\/cisco\/bin\/mosaic_server 0 \nroot
10:58 ? 00:00:00 \/usr\/local\/cisco\/bin\/mosaic_server 1 \nroot
10:58 ? 00:00:00 audio_setup_outputs\nroot
10:58 ? 00:00:00 [Audio_Input]\nroot
10:58 ? 00:00:00 [sh] &defunct&\nroot
10:58 ? 00:00:01 [kjournald]\nroot
10:58 ? 00:00:01 \/usr\/local\/cisco\/sbin\/rsyslogd -c5\n 0 10:58 ? 00:00:08 dbus-daemon --system\n 0 10:58 ? 00:00:00 hald --daemon=yes\nroot
10:58 ? 00:00:00 hald-runner\nroot
10:58 ? 00:00:00 hald-addon-storage: polling \/dev\/ciscoapps (every 2 sec)\nroot
10:58 ? 00:00:01 bluetoothd\nroot
10:58 ? 00:00:00 Agent_3g\nroot
10:58 ? 00:00:00 wan_detector\nroot
10:58 ? 00:00:05 slim\nroot
10:58 tty2 00:02:06 \/usr\/bin\/X -auth \/var\/run\/slim.auth\nroot
10:58 ? 00:00:00 dhclient br0\nroot
10:58 ? 00:00:19 \/bin\/sh \/scripts\/status_check.sh\nroot
10:59 ? 00:00:00 \/sbin\/smi\nroot
10:59 ? 00:00:00 [kjournald]\nstudent
10:59 ? 00:00:00 \/bin\/sh \/etc\/xinitrc xfce4\nstudent
10:59 ? 00:00:00 \/bin\/sh \/scripts\/startxfce4\nstudent
10:59 ? 00:00:01 xfce4-session\nroot
10:59 ? 00:00:00 init \nstudent
10:59 ? 00:00:00 dbus-launch --autolaunch 4b8ead084cac --binary-syntax --close-stderr\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/bin\/dbus-daemon --fork --print-pid 5 --print-address 7 --session\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/lib\/xfce4\/xfconf\/xfconfd\nstudent
10:59 ? 00:00:21 xfwm4\nstudent
10:59 ? 00:00:00 xfsettingsd\nstudent
10:59 ? 00:00:35 xfce4-panel\nstudent
10:59 ? 00:00:00 Thunar --daemon\nstudent
10:59 ? 00:00:03 xfdesktop\nstudent
10:59 ? 00:00:00 3G_Dongle\nstudent
10:59 ? 00:00:13 BlueToothUI\nstudent
10:59 ? 00:00:24 \/usr\/local\/cisco\/lib\/xfce4\/panel\/wrapper \/usr\/local\/cisco\/lib\/xfce4\/panel\/plugins\/libsystray.so 6
systray Notification Area Area where notification icons appear \nstudent
10:59 ? 00:00:03 wifi_status hide\nstudent
10:59 ? 00:00:12 wired_status hide & \/dev\/null\nstudent
10:59 ? 00:00:00 xfce4-settings-helper\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfsd\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gconfd-2\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfs-hal-volume-monitor\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/libexec\/\/gvfs-fuse-daemon \/apps\/localconfig\/student\/.gvfs\nstudent
10:59 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfsd-trash --spawner :1.11 \/org\/gtk\/gvfs\/exec_spaw\/0\nstudent
11:00 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-launcher -d -c simple -e all -f socket --no-stay\nstudent
11:00 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-helper-manager\nstudent
11:00 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-panel-gtk --display :0.0 -c socket -d --no-stay\nstudent
11:00 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-launcher -d -c socket -e socket -f x11\nroot
16:40 ? 00:00:00 hald-addon-input: Listening on \/dev\/input\/event0 \/dev\/input\/event1 \/dev\/input\/event2\nroot
16:41 ? 00:00:00 [Audio_Recovery]\nroot
16:41 ? 00:00:00 [scsi_eh_4]\nroot
16:41 ? 00:00:00 [usb-storage]\nroot
16:41 ? 00:00:00 hald-addon-storage: polling \/dev\/sdb (every 2 sec)\nroot
16:41 ? 00:00:00 [kjournald]\nstudent
11:04 ? 00:00:08 \/usr\/local\/cisco\/bin\/Terminal\nstudent
11:04 ? 00:00:00 gnome-pty-helper\nstudent
11:04 pts\/0 00:00:00 bash\nroot
0 11:40 pts\/0 00:00:00 -bash\nroot
0 17:23 ? 00:00:00 sleep 1\nroot
0 17:23 ? 00:00:00 sh -c cd '\/usr\/local\/cisco\/nginx\/html\/api\/1.0\/sys' ; \/usr\/local\/cisco\/bin\/ps -ef 2&&1\nroot
0 17:23 ? 00:00:00 \/usr\/local\/cisco\/bin\/ps -ef\n&,&success&:&true&,&getAt&:& 08:23:50&}
N/A. 003 error is reported if it is requested.
Example: get storage
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/storage
{&storage&:&Filesystem Size Used Available Use% Mounted on\n\/dev\/root 1.6G 1.2G 343.1M 78% \/\ntmpfs 512.0M 428.0K 511.6M 0% \/tmp\ntmpfs 4.0K 0 4.0K 0% \/media\ntmpfs 20.0M 228.0K 19.8M 1% \/var\n\/dev\/ciscoapps 1.8G 527.4M 1.2G 30% \/apps\n\/dev\/Glob_Spectraa1 96.6M 77.9M 13.8M 85% \/tmp\/smi_spectraa1\ntmpfs 32.0M 17.8M 14.2M 56% \/tmp\/firefox_cached\n64.104.163.32:\/var\/www\/html\/api 25.6G 6.2G 18.1G 26% \/usr\/local\/cisco\/nginx\/html\/api\n\/dev\/sdb1 7.3G 308.1M 6.7G 4% \/media\/sdb1\n&,&success&:&true&,&getAt&:& 08:35:55&}
N/A. 003 error is reported if it is requested.
Example: get model
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/model
{&model&:&CS-E300-AP-K9&,&success&:&true&,&getAt&:& 08:59:00&}
Example: set IP address to 64.104.163.55 and netmask to 255.255.255.128
curl -m 5 -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&type& : &static&,&ipv4&:&64.104.163.55&,&netmask&:&255.255.255.128&}' https://64.104.163.47/api/1.0/sys/ip
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The parameter type is static or DHCP. If static is specified in the type field, ipv4 and netmask must also be specified. IPv4 must be a valid IPv4 address. Netmask must be one of the following strings:
&255.0.0.0&,
&255.128.0.0&,
&255.192.0.0&,
&255.224.0.0&,
&255.240.0.0&,
&255.248.0.0&,
&255.252.0.0&,
&255.254.0.0&,
&255.255.0.0&,
&255.255.128.0&,
&255.255.192.0&,
&255.255.224.0&,
&255.255.240.0&,
&255.255.248.0&,
&255.255.252.0&,
&255.255.254.0&,
&255.255.255.0&,
&255.255.255.128&,
&255.255.255.192&,
&255.255.255.224&,
&255.255.255.240&,
&255.255.255.248&,
&255.255.255.252&,
&255.255.255.254&,
&255.255.255.255&
Note Since the IP address is changed after the execution, “-m 5” must be specified to make sure that the command will not be appending forever.
Example: get ip address
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/ip
{&ip&:&10.140.44.134&,&success&:&true&,&getAt&:& 08:48:53&}
Example: set gateway
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&gateway&:&64.104.163.1&}' https://10.140.44.134/api/1.0/sys/gateway
{&success&:&true&,&updatedAt&:& 05:46:07&}
Parameter restrictions
The gateway should be a valid IP address.
Example: get gateway
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/gateway
{&gateway&:&64.104.163.1&,&success&:&true&,&getAt&:& 08:49:59&}
Example: set DNS to 8.8.8.8
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&dns&:&8.8.8.8&}' https://10.140.44.134/api/1.0/sys/dns
{&success&:&true&,&updatedAt&:& 07:50:00&}
Parameter restrictions
DNS should be a valid IP address.
Example: get DNS
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/dns
{&dns&:&64.104.123.144 171.70.168.183 &,&success&:&true&,&getAt&:& 08:50:37&}
Example: set WiFi mode
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&wifiMode&:&client&}' https://10.140.44.134/api/1.0/sys/wifiMode
{&success&:&true&,&updatedAt&:& 08:11:16&}
Parameter restrictions
The WiFi mode should be AP or client.
Example: get WiFi mode
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys/wifiMode
{&wifiMode&:&ap&,&success&:&true&,&getAt&:& 08:09:59&}
Example: set a proxy of chrome browser
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&proxy& : {&host&:&10.10.10.10&,&scheme&:&http&,&port&:&10&,&username&:&cisco&,&password&:&cisco&}}' https://10.140.44.134/api/1.0/sys/proxy
{&success&:&true&,&updatedAt&:& 08:11:16&}
Parameter restrictions
host: IP address/hostname. If not specified, the proxy setting will be set to none.
scheme: http/https
port: Should be an integer within the range 0 and 65535.
username and password: Optional. Specify the account information of the proxy.
Note You must specify both username and password. If only the username is specified, both the username and password will be deleted.
Example: get the proxy of chrome browser
curl -k -X GET -H 'password: cisco123!' https://10.140.28.47/api/1.0/sys/proxy
{&proxy&:&http://cisco:cisco@10.10.10.10:10&,&success&:&true&,&getAt&:& 04:04:03&}
Example: set hostname to ce300, NTP server to 202.120.2.101, and log size to 30 MB.
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&hostname&:&ce300&, &ntpServer& : &202.120.2.101&,&log_size&:&30&}' https://10.140.44.134/api/1.0/sys
{&success&:&true&,&updatedAt&:& 19:49:21&}
Parameter restrictions
The parameter should be a valid IPv4 address.
Example: get all system information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/sys{&hostname&:&intel_ce_linux&, &size&:&30&, &ip&:&10.140.44.134&,&gateway&:&10.140.28.1&,&dns&:&64.104.123.144 171.70.168.183&,&language&:&1&,&model&:&CS-E300-AP-K9&,&locale&:&8&,&time&:& 16:13:03&,&ntpServer&:&10.81.254.202&,&loginGui&:&disable&,&resolution&:&9&,&wifiMode&:&client&,&bluetooth&:&on&,&memory&:&Mem: 380776K used, 1308116K free, 0K shrd, 27764K buff, 170748K cached&,&storage&:&Filesystem Size Used Available Use% Mounted on\n\/dev\/root 1.6G 1.2G 300.9M 81% \/\ntmpfs 512.0M 172.0K 511.8M 0% \/tmp\ntmpfs 4.0K 0 4.0K 0% \/media\ntmpfs 20.0M 88.0K 19.9M 0% \/var\n\/dev\/ciscoapps 1.8G 539.6M 1.2G 30% \/apps\n\/dev\/Glob_Spectraa1 96.6M 84.4M 7.2M 92% \/tmp\/smi_spectraa1\ntmpfs 32.0M 17.8M 14.2M 56% \/tmp\/firefox_cached\n10.140.28.35:\/var\/www\/html\/api 25.6G 7.2G 17.1G 30% \/usr\/local\/cisco\/nginx\/html\/api\n&,&cpu&:&CPU: 0% usr 72% sys 0% nic 27% idle 0% io 0% irq 0% sirq&,&proc&:&UID PID PPID C STIME TTY TIME CMD\nroot 1 0 0 15:35 ? 00:00:01 init \nroot 2 0 0 15:35 ? 00:00:00 [kthreadd]\nroot 3 2 0 15:35 ? 00:00:00 [migration\/0]\nroot 4 2 0 15:35 ? 00:00:00 [ksoftirqd\/0]\nroot 5 2 0 15:35 ? 00:00:00 [events\/0]\nroot 6 2 0 15:35 ? 00:00:00 [khelper]\nroot 9 2 0 15:35 ? 00:00:00 [kstop\/0]\nroot 134 2 0 15:35 ? 00:00:00 [kblockd\/0]\nroot 136 2 0 15:35 ? 00:00:00 [kacpid]\nroot 137 2 0 15:35 ? 00:00:00 [kacpi_notify]\nroot 216 2 0 15:35 ? 00:00:00 [ata\/0]\nroot 217 2 0 15:35 ? 00:00:00 [ata_aux]\nroot 218 2 0 15:35 ? 00:00:00 [ksuspend_usbd]\nroot 224 2 0 15:35 ? 00:00:00 [khubd]\nroot 227 2 0 15:35 ? 00:00:00 [kseriod]\nroot 229 2 0 15:35 ? 00:00:00 [kgameportd]\nroot 232 2 0 15:35 ? 00:00:00 [kmmcd]\nroot 283 2 0 15:35 ? 00:00:00 [pdflush]\nroot 284 2 0 15:35 ? 00:00:00 [pdflush]\nroot 285 2 0 15:35 ? 00:00:00 [kswapd0]\nroot 326 2 0 15:35 ? 00:00:00 [aio\/0]\nroot 337 2 0 15:35 ? 00:00:00 [nfsiod]\nroot 342 2 0 15:35 ? 00:00:00 [cifsoplockd]\nroot 343 2 0 15:35 ? 00:00:00 [cifsdnotifyd]\nroot 527 2 0 15:35 ? 00:00:00 [scsi_eh_0]\nroot 529 2 0 15:35 ? 00:00:00 [scsi_eh_1]\nroot 533 2 0 15:35 ? 00:00:00 [mtdblockd]\nroot 579 2 0 15:35 ? 00:00:00 [kpsmoused]\nroot 588 2 0 15:35 ? 00:00:00 [hid_compat]\nroot 612 2 6 15:35 ? 00:02:22 [Glob_Spectra]\nroot 618 2 0 15:35 ? 00:00:11 [nandflush]\nroot 628 2 0 15:35 ? 00:00:00 [krfcommd]\nroot 631 2 0 15:35 ? 00:00:00 [rpciod\/0]\nroot 688 2 0 15:35 ? 00:00:00 [scsi_eh_2]\nroot 689 2 0 15:35 ? 00:00:00 [usb-storage]\nroot 704 2 0 15:35 ? 00:00:00 [kjournald]\nroot 917 1 0 15:35 ? 00:00:00 udevd -d\nroot
15:35 ? 00:00:00 [SEC int]\nroot
15:35 ? 00:00:00 \/bin\/cdp eth0 start\nroot
15:35 ? 00:00:04 [Clock_ISR]\nroot
15:35 ? 00:00:21 \/bin\/gdl_server blender_config 1\nroot
15:35 ? 00:00:00 [VidDec_hal_pars]\nroot
15:35 ? 00:00:00 [VidDec_hal_deco]\nroot
15:35 ? 00:00:00 [VidPProc_ISR]\nroot
15:35 ? 00:00:00 [VidPProc_IO]\nroot
15:35 ? 00:00:02 [VidRend_IO]\nroot
15:35 ? 00:00:00 [VidRend_IO]\nroot
15:35 ? 00:00:08 [Audio_Rend_ISR]\nroot
15:35 ? 00:00:03 [Audio_Timing]\nroot
15:35 ? 00:00:00 [Audio_Pipe_Mgr]\nroot
15:35 ? 00:00:00 [Audio_DSP0_ISR]\nroot
15:35 ? 00:00:00 [Audio_DSP1_ISR]\nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/sbin\/snmpd -p \/var\/run\/snmpd.pid\nroot
15:36 ? 00:00:00 \/bin\/konfd\nroot
15:36 ? 00:00:00 php-fpm: master process (\/usr\/local\/cisco\/php\/etc\/php-fpm.conf) \nroot
15:36 ? 00:00:00 php-fpm: pool root \nroot
15:36 ? 00:00:00 php-fpm: pool root \nroot
15:36 ? 00:00:00 nginx: master process \/usr\/local\/cisco\/nginx\/sbin\/nginx\nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/\/sbin\/cupsd -C \/usr\/local\/cisco\/\/etc\/cups\/cupsd.conf\nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/sbin\/xinetd\nroot
15:36 ? 00:00:00 \/sbin\/sshd\nroot
15:36 ? 00:00:11 \/usr\/local\/cisco\/sbin\/cron\nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/bin\/mosaic_server 0 \nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/bin\/mosaic_server 1 \nroot
15:36 ? 00:00:00 audio_setup_outputs\nroot
15:36 ? 00:00:00 [Audio_Input]\nroot
15:36 ? 00:00:00 [sh] &defunct&\nroot
15:36 ? 00:00:00 [Audio_Recovery]\nroot
15:36 ? 00:00:00 [kjournald]\nroot
15:36 ? 00:00:00 \/usr\/local\/cisco\/sbin\/rsyslogd -c5\n 0 15:36 ? 00:00:00 dbus-daemon --system\n 0 15:36 ? 00:00:00 hald --daemon=yes\nroot
15:36 ? 00:00:00 hald-runner\nroot
15:36 ? 00:00:00 hald-addon-input: Listening on \/dev\/input\/event2 \/dev\/input\/event1 \/dev\/input\/event0\nroot
15:36 ? 00:00:00 hald-addon-storage: polling \/dev\/ciscoapps (every 2 sec)\nroot
15:36 ? 00:00:00 bluetoothd\nroot
15:36 ? 00:00:00 Agent_3g\nroot
15:36 ? 00:00:00 wan_detector\nroot
15:36 ? 00:00:04 slim\nroot
15:36 tty2 00:00:22 \/usr\/bin\/X\nroot
15:36 ? 00:00:00 dhclient br0\nroot
15:36 ? 00:00:01 \/bin\/sh \/scripts\/status_check.sh\nstudent
15:36 ? 00:00:00 \/bin\/sh \/etc\/xinitrc xfce4\nstudent
15:36 ? 00:00:00 \/bin\/sh \/scripts\/startxfce4\nstudent
15:36 ? 00:00:01 xfce4-session\nroot
15:36 ? 00:00:00 \/sbin\/smi\nroot
15:36 ? 00:00:00 \/bin\/heartbeat\nroot
15:36 ? 00:00:00 [kjournald]\nstudent
15:37 ? 00:00:00 dbus-launch --autolaunch a822b50baa --binary-syntax --close-stderr\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/bin\/dbus-daemon --fork --print-pid 5 --print-address 7 --session\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/lib\/xfce4\/xfconf\/xfconfd\nroot
15:37 ? 00:00:00 init \nstudent
15:37 ? 00:00:00 xfsettingsd\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfsd\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/libexec\/\/gvfs-fuse-daemon \/apps\/localconfig\/student\/.gvfs\nstudent
15:37 ? 00:00:02 xfwm4\nstudent
15:37 ? 00:00:02 xfce4-panel\nstudent
15:37 ? 00:00:00 Thunar --daemon\nstudent
15:37 ? 00:00:02 xfdesktop\nstudent
15:37 ? 00:00:00 3G_Dongle\nstudent
15:37 ? 00:00:01 BlueToothUI\nstudent
15:37 ? 00:00:01 wifi_status hide\nstudent
15:37 ? 00:00:03 wired_status hide & \/dev\/null\nstudent
15:37 ? 00:00:00 xfce4-settings-helper\nstudent
15:37 ? 00:00:01 \/usr\/local\/cisco\/lib\/xfce4\/panel\/wrapper \/usr\/local\/cisco\/lib\/xfce4\/panel\/plugins\/libsystray.so 6
systray Notification Area Area where notification icons appear \nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfs-hal-volume-monitor\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gvfsd-trash --spawner :1.4 \/org\/gtk\/gvfs\/exec_spaw\/0\nstudent
15:37 ? 00:00:00 \/usr\/local\/cisco\/libexec\/gconfd-2\nstudent
15:38 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-launcher -d -c simple -e all -f socket --no-stay\nstudent
15:38 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-helper-manager\nstudent
15:38 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-panel-gtk --display :0.0 -c socket -d --no-stay\nstudent
15:38 ? 00:00:00 \/usr\/local\/cisco\/lib\/scim-1.0\/scim-launcher -d -c socket -e socket -f x11\nstudent
15:38 ? 00:00:03 \/usr\/local\/cisco\/bin\/Terminal\nstudent
15:38 ? 00:00:00 gnome-pty-helper\nstudent
15:38 pts\/0 00:00:00 bash\nroot
15:38 pts\/0 00:00:00 -bash\nroot
15:39 ? 00:00:01 nginx: worker process \nroot
16:13 ? 00:00:00 sleep 1\nroot
16:13 ? 00:00:00 sh -c cd '\/usr\/local\/cisco\/nginx\/html\/api\/1.0\/sys' ; LC_ALL=zh_CN.utf-8;\/usr\/local\/cisco\/bin\/ps -ef 2&&1\nroot
16:13 ? 00:00:00 \/usr\/local\/cisco\/bin\/ps -ef\nroot
15:50 ? 00:00:00 [RtmpTimerTask]\nroot
15:50 ? 00:00:02 [RtmpMlmeTask]\nroot
15:50 ? 00:00:00 [RtmpCmdQTask]\nstudent
0 15:58 pts\/1 00:00:00 bash\nroot
0 15:58 pts\/1 00:00:00 -bash\nroot
0 16:05 pts\/1 00:00:00 clish\n&,&success&:&true&,&getAt&:& 08:13:07&}
Example: set custom fonts
Fonts are located in a local directory:
curl -k -X PUT -H 'password: cisco' -H 'Content-Type: application/json' -d '{&fonts& : &/usr/local/cisco/share/fonts/thai-ttf/Waree.ttf&}' https://10.75.189.228/api/1.0/sys/fonts
Fonts are obtained from an HTTP server:
curl -k -X PUT -H 'password: cisco' -H 'Content-Type: application/json' -d '{&fonts& : &http://dl.1001fonts.com/rochester.zip&}' https://10.75.189.228/api/1.0/sys/fonts
{&success&:&true&,&updatedAt&:& 02:33:34&}
Parameter restrictions
The fonts can be obtained either from a local directory or from a remote site through HTTP, HTTPS, or FTP.
Example: get fonts list
curl -k -X GET -H 'password: cisco' https://10.75.189.228/api/1.0/sys/fonts
{&fonts&:&Fixed:style=Bold\nFixed:style=Bold SemiCondensed\nFixed:style=SemiCondensed\nFixed:style=Oblique SemiCondensed\nFixed:style=Oblique\nFixed:style=ko\nFixed:style=ja\nFixed:style=Regular\n&,&success&:&true&,&getAt&:& 02:41:19&}
Example: remove custom fonts
curl -k -X DELETE -m 60 -H 'password: cisco' -H 'Content-Type: application/json' -d '{&fonts& : &Waree.ttf&}' https://10.75.189.228/api/1.0/sys/fonts
{&success&:&true&,&updatedAt&:& 02:53:21&}
Parameter restrictions
Provide the custom installed fonts name.
Example: set master volume to 77 and set mute to false
curl -k -X PUT -H 'password: cisco' -H 'Content-Type: application/json' -d '{&mute&:&false&, &volume&:&77& }' https://64.104.169.83/api/1.0/sys/audio/default/Master
{&success&:&true&,&updatedAt&:& 07:50:00&}
Parameter restrictions
The volume range is 0–100. Valid values for mute are true and false.
Example: get master audio volume information
curl -k -X GET -H 'password: cisco' https://64.104.169.83/api/1.0/sys/audio/default/Master
{&mute&:&true&,&volume&:&50&,&success&:&true&,&getAt&:& 03:03:02&}
Example: set capture volume to 77 and set mute to false
curl -k -X PUT -H 'password: cisco' -H 'Content-Type: application/json' -d '{&mute&:&false&, &volume&:&77& }' https://64.104.169.83/api/1.0/sys/audio/default/Capture
{&success&:&true&,&updatedAt&:& 07:50:00&}
Parameter restrictions
The volume range is 0–100. Valid values for mute are true and false.
Example: get capture audio volume information
curl -k -X GET -H 'password: cisco' https://64.104.169.83/api/1.0/sys/audio/default/Capture
{&mute&:&true&,&volume&:&50&,&success&:&true&,&getAt&:& 03:03:02&}
Example: set timezone to Asia/Shanghai
curl -k -X PUT -H 'password: cisco' -H 'Content-Type: application/json' -d '{&timezone&:&Asia/Shanghai&}' https://64.104.169.102/api/1.0/sys/timezone
{&success&:&true&,&updatedAt&:& 07:50:00&}
Parameter restrictions
The valid strings for timezone are as following:
Africa/Sao_Tome, Africa/Johannesburg, Africa/Maputo, Africa/Lagos, Africa/Mogadishu, Africa/Dakar, Africa/Lubumbashi, Africa/Nouakchott, Africa/Timbuktu, Africa/Abidjan, Africa/Niamey, Africa/Tripoli, Africa/Bujumbura, Africa/Lusaka, Africa/Freetown, Africa/Kinshasa, Africa/Luanda, Africa/Ndjamena, Africa/Ceuta, Africa/Maseru, Africa/Khartoum, Africa/Dar_es_Salaam, Africa/Addis_Ababa, Africa/Algiers, Africa/Asmara, Africa/Libreville, Africa/Asmera, Africa/Djibouti, Africa/Malabo, Africa/Gaborone, Africa/Ouagadougou, Africa/Kigali, Africa/Porto-Novo, Africa/Windhoek, Africa/Monrovia, Africa/Cairo, Africa/Banjul, Africa/Conakry, Africa/Harare, Africa/Bangui, Africa/Tunis, Africa/Mbabane, Africa/Bissau, Africa/El_Aaiun, Africa/Brazzaville, Africa/Blantyre, Africa/Lome, Africa/Kampala, Africa/Nairobi, Africa/Accra, Africa/Bamako, Africa/Casablanca, Africa/Douala, America/Hermosillo, America/Rosario, America/Bahia, America/Martinique, America/Dominica, America/Atikokan, America/Recife, America/Aruba, America/Mendoza, America/Santarem, America/Montserrat, America/Jamaica, America/St_Johns, America/Knox_IN, America/Buenos_Aires, America/St_Kitts, America/Chicago, America/Guyana, America/Boise, America/North_Dakota/Center, America/North_Dakota/New_Salem, America/Miquelon, America/Lima, America/Regina, America/Inuvik, America/Pangnirtung, America/Winnipeg, America/Rankin_Inlet, America/Halifax, America/Nassau, America/Rio_Branco, America/Manaus, America/Cuiaba, America/Cancun, America/Blanc-Sablon, America/Moncton, America/Edmonton, America/Danmarkshavn, America/Jujuy, America/Ensenada, America/Tegucigalpa, America/Santiago, America/Cayenne, America/Merida, America/Belem, America/St_Lucia, America/Puerto_Rico, America/Glace_Bay, America/Coral_Harbour, America/Tijuana, America/Sao_Paulo, America/Mazatlan, America/La_Paz, America/Atka, America/Los_Angeles, America/Noronha, America/Tortola, America/Cayman, America/Porto_Velho, America/Caracas, America/Swift_Current, America/Mexico_City, America/Maceio, America/Cordoba, America/Rainy_River, America/Iqaluit, America/New_York, America/Montreal, America/Araguaina, America/Denver, America/Adak, America/Shiprock, America/Barbados, America/St_Vincent, America/Chihuahua, America/Guatemala, America/St_Thomas, America/Cambridge_Bay, America/Phoenix, America/Eirunepe, America/Belize, America/Guadeloupe, America/Antigua, America/Nome, America/Catamarca, America/Port_of_Spain, America/Indiana/Petersburg, America/Indiana/Vincennes, America/Indiana/Knox, America/Indiana/Marengo, America/Indiana/Winamac, America/Indiana/Vevay, America/Indiana/Indianapolis, America/Indiana/Tell_City, America/Paramaribo, America/Grand_Turk, America/Boa_Vista, America/Panama, America/Thunder_Bay, America/Whitehorse, America/Godthab, America/Toronto, America/Goose_Bay, America/Guayaquil, America/Kentucky/Monticello, America/Kentucky/Louisville, America/Juneau, America/Campo_Grande, America/Anchorage, America/Argentina/Mendoza, America/Argentina/Buenos_Aires, America/Argentina/Rio_Gallegos, America/Argentina/La_Rioja, America/Argentina/Tucuman, America/Argentina/Jujuy, America/Argentina/Salta, America/Argentina/Cordoba, America/Argentina/San_Luis, America/Argentina/Ushuaia, America/Argentina/ComodRivadavia, America/Argentina/Catamarca, America/Argentina/San_Juan, America/Montevideo, America/Asuncion, America/Monterrey, America/Curacao, America/Menominee, America/Havana, America/Costa_Rica, America/Yakutat, America/Detroit, America/Managua, America/Louisville, America/Dawson_Creek, America/Dawson, America/Resolute, America/Nipigon, America/Yellowknife, America/Santo_Domingo, America/Fort_Wayne, America/Bogota, America/Indianapolis, America/Port-au-Prince, America/Grenada, America/Porto_Acre, America/Anguilla, America/St_Barthelemy, America/Fortaleza, America/Marigot, America/Scoresbysund, America/Virgin, America/El_Salvador, America/Thule, America/Vancouver, Antarctica/South_Pole, Antarctica/Mawson, Antarctica/Palmer, Antarctica/Rothera, Antarctica/DumontDUrville, Antarctica/Syowa, Antarctica/McMurdo, Antarctica/Davis, Antarctica/Vostok, Antarctica/Casey, Arctic/Longyearbyen, Asia/Brunei, Asia/Kuwait, Asia/Amman, Asia/Riyadh89, Asia/Aden, Asia/Thimphu, Asia/Jerusalem, Asia/Riyadh, Asia/Ujung_Pandang, Asia/Macao, Asia/Istanbul, Asia/Phnom_Penh, Asia/Shanghai, Asia/Bahrain, Asia/Taipei, Asia/Seoul, Asia/Bangkok, Asia/Ashgabat, Asia/Yerevan, Asia/Dhaka, Asia/Macau, Asia/Karachi, Asia/Tashkent, Asia/Dacca, Asia/Chongqing, Asia/Calcutta, Asia/Dubai, Asia/Chungking, Asia/Kashgar, Asia/Ashkhabad, Asia/Vientiane, Asia/Yakutsk, Asia/Beirut, Asia/Pontianak, Asia/Nicosia, Asia/Irkutsk, Asia/Tbilisi, Asia/Kuching, Asia/Tehran, Asia/Tokyo, Asia/Singapore, Asia/Bishkek, Asia/Dushanbe, Asia/Baku, Asia/Hong_Kong, Asia/Baghdad, Asia/Ulan_Bator, Asia/Damascus, Asia/Choibalsan, Asia/Jayapura, Asia/Yekaterinburg, Asia/Katmandu, Asia/Qyzylorda, Asia/Qatar, Asia/Kolkata, Asia/Kathmandu, Asia/Makassar, Asia/Ho_Chi_Minh, Asia/Thimbu, Asia/Oral, Asia/Sakhalin, Asia/Riyadh87, Asia/Magadan, Asia/Gaza, Asia/Anadyr, Asia/Krasnoyarsk, Asia/Aqtau, Asia/Riyadh88, Asia/Muscat, Asia/Urumqi, Asia/Omsk, Asia/Ulaanbaatar, Asia/Vladivostok, Asia/Kuala_Lumpur, Asia/Colombo, Asia/Samarkand, Asia/Kabul, Asia/Almaty, Asia/Harbin, Asia/Kamchatka, Asia/Aqtobe, Asia/Pyongyang, Asia/Novosibirsk, Asia/Manila, Asia/Jakarta, Asia/Rangoon, Asia/Tel_Aviv, Asia/Hovd, Asia/Dili, Asia/Saigon, Atlantic/Stanley, Atlantic/Madeira, Atlantic/St_Helena, Atlantic/Azores, Atlantic/Faroe, Atlantic/Jan_Mayen, Atlantic/South_Georgia, Atlantic/Faeroe, Atlantic/Reykjavik, Atlantic/Bermuda, Atlantic/Canary, Atlantic/Cape_Verde, Australia/Sydney, Australia/South, Australia/Currie, Australia/Perth, Australia/Yancowinna, Australia/North, Australia/West, Australia/Darwin, Australia/Lord_Howe, Australia/Lindeman, Australia/Victoria, Australia/NSW, Australia/ACT, Australia/Brisbane, Australia/Melbourne, Australia/Eucla, Australia/Hobart, Australia/Queensland, Australia/Adelaide, Australia/Tasmania, Australia/Canberra, Australia/LHI, Australia/Broken_Hill, Brazil/West, Brazil/Acre, Brazil/East, Brazil/DeNoronha, Canada/Pacific, Canada/Mountain, Canada/Atlantic, Canada/Central, Canada/Eastern, Canada/East-Saskatchewan, Canada/Saskatchewan, Canada/Newfoundland, Canada/Yukon, CET, Chile/EasterIsland, Chile/Continental, CST6CDT, Cuba, EET, Egypt, Eire, EST, EST5EDT, Etc/GMT+12, Etc/GMT+9, Etc/GMT, Etc/GMT-13, Etc/GMT0, Etc/GMT+11, Etc/GMT+5, Etc/GMT-0, Etc/GMT-2, Etc/GMT-10, Etc/GMT-11, Etc/GMT+2, Etc/UCT, Etc/GMT-1, Etc/GMT+3, Etc/GMT+0, Etc/UTC, Etc/GMT+10, Etc/GMT-7, Etc/Zulu, Etc/GMT-6, Etc/GMT+1, Etc/GMT-5, Etc/GMT-12, Etc/GMT+4, Etc/GMT-9, Etc/GMT+7, Etc/GMT+8, Etc/Universal, Etc/GMT-3, Etc/GMT-14, Etc/GMT-8, Etc/Greenwich, Etc/GMT+6, Etc/GMT-4, Europe/Bucharest, Europe/Riga, Europe/Kaliningrad, Europe/Monaco, Europe/San_Marino, Europe/Budapest, Europe/Gibraltar, Europe/Lisbon, Europe/Belgrade, Europe/Athens, Europe/Warsaw, Europe/Vatican, Europe/Chisinau, Europe/Istanbul, Europe/Madrid, Europe/Paris, Europe/Bratislava, Europe/Dublin, Europe/Helsinki, Europe/London, Europe/Zaporozhye, Europe/Volgograd, Europe/Tirane, Europe/Simferopol, Europe/Samara, Europe/Sarajevo, Europe/Mariehamn, Europe/Tallinn, Europe/Prague, Europe/Andorra, Europe/Ljubljana, Europe/Vienna, Europe/Kiev, Europe/Isle_of_Man, Europe/Oslo, Europe/Nicosia, Europe/Skopje, Europe/Brussels, Europe/Rome, Europe/Belfast, Europe/Amsterdam, Europe/Sofia, Europe/Minsk, Europe/Zagreb, Europe/Luxembourg, Europe/Moscow, Europe/Tiraspol, Europe/Vaduz, Europe/Stockholm, Europe/Podgorica, Europe/Zurich, Europe/Copenhagen, Europe/Berlin, Europe/Jersey, Europe/Vilnius, Europe/Malta, Europe/Guernsey, Europe/Uzhgorod, Factory, GB, GB-Eire, GMT, GMT0, GMT-0, GMT+0, Greenwich, Hongkong, HST, Iceland, Indian/Cocos, Indian/Kerguelen, Indian/Christmas, Indian/Reunion, Indian/Antananarivo, Indian/Mauritius, Indian/Chagos, Indian/Maldives, Indian/Mayotte, Indian/Comoro, Indian/Mahe, Iran, Israel, Jamaica, Japan, Kwajalein, Libya, MET, Mexico/BajaNorte, Mexico/BajaSur, Mexico/General, Mideast/Riyadh89, Mideast/Riyadh87, Mideast/Riyadh88, MST, MST7MDT, Navajo, NZ, NZ-CHAT, Pacific/Majuro, Pacific/Guadalcanal, Pacific/Noumea, Pacific/Tongatapu, Pacific/Tarawa, Pacific/Palau, Pacific/Wallis, Pacific/Johnston, Pacific/Apia, Pacific/Kwajalein, Pacific/Kiritimati, Pacific/Norfolk, Pacific/Wake, Pacific/Easter, Pacific/Enderbury, Pacific/Fiji, Pacific/Ponape, Pacific/Gambier, Pacific/Pitcairn, Pacific/Truk, Pacific/Samoa, Pacific/Nauru, Pacific/Auckland, Pacific/Niue, Pacific/Fakaofo, Pacific/Rarotonga, Pacific/Chatham, Pacific/Tahiti, Pacific/Marquesas, Pacific/Funafuti, Pacific/Guam, Pacific/Saipan, Pacific/Honolulu, Pacific/Yap, Pacific/Pago_Pago, Pacific/Midway, Pacific/Kosrae, Pacific/Efate, Pacific/Galapagos, Pacific/Port_Moresby, Poland, Portugal, PRC, PST8PDT, ROC, ROK, Singapore, Turkey, UCT, Universal, US/Indiana-Starke, US/Pacific, US/Mountain, US/East-Indiana, US/Aleutian, US/Hawaii, US/Central, US/Eastern, US/Michigan, US/Samoa, US/Arizona, US/Alaska, UTC, WET, W-SU, Zulu,
Example: get timezone information
curl -k -X GET -H 'password: cisco' https://64.104.169.102/api/1.0/sys/timezone
{&timezone&:&Asia/Shanghai&,&success&:&true&,&getAt&:& 03:19:46&}
Use the commands IN this section to configure Ethernet API.
Note Curl is used as a sample tool to request APIs. 10.140.44.134 is used as a sample IP address of the Cisco Edge 300 series switch, and cisco123! is used as a sample admin password.
N/A. 003 error is reported if it is requested.
Example: get gi1 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/status
{&status&:&enable&,&success&:&true&,&getAt&:& 08:47:44&}
N/A. 003 error is reported if it is requested.
Example: get gi1 mac
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/mac
{&mac&:&1C:AA:07:97:A3:C0&,&success&:&true&,&getAt&:& 08:51:19&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/gi1/oqs
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set gi1 pause to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&pause& : &on&}' https://10.140.44.134/api/1.0/eth/gi1/pause
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
on and off are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 pause
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/pause
{&pause&:&on&,&success&:&true&,&getAt&:& 09:29:55&}
Example: set gi1 pause to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/gi1/priority
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set gi1 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/gi1/rateLim
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get gi1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set gi1 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/gi1/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, 100, and 1000 are valid parameters.
Example: get gi1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set gi1 duplex to &auto&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/gi1/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full, and half are valid parameters.
Example: get gi1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set gi1 rate limit to &unknown-unicast&, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&, &pause&:&off&}' https://10.140.44.134/api/1.0/eth/gi1
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get gi1 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/gi1
{&status&:&enable&,&dns&:&64.104.123.144 171.70.168.183&,&mac&:&1C:AA:07:97:A3:C0&,&oqs&:&strict&,&pause&:&on&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&100&,&success&:&true&,&getAt&:& 08:53:52&}
Example: set fe1 status to disable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe1/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe1 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe1/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe1 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe1 pause to &on&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe1/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe1 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe1/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe1 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe1/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, and 100 are valid parameters.
Example: get fe1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe1 duplex to &auto&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe1/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full and half are valid parameters.
Example: get fe1 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe1 rate limit to unknown-unicast, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe1
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe1 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe1
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Example: set fe2 status to &disable&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe2/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe2 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe2/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe2 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe2 pause to &on&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe2/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe2 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe2/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe2 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe2 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe2/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, and 100 are valid parameters.
Example: get fe2 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe2 duplex to &auto&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe2/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full and half are valid parameters.
Example: get fe2 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe2 rate limit to unknown-unicast, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe2
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe2 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe2
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Example: set fe3 status to disable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe3/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe3 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe3/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe3 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe3 pause to &on&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe3/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe3 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe3/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe3 rate limit to &unknown-unicast&
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe3/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, and 100 are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe3 duplex to auto
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe3/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full, and half are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe3 rate limit to unknown-unicast, pause, or off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe3
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe3 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Example: set fe3 status to disable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe3/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe3 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe3/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe3 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe3 pause to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe3/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe3 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe3/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe3 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe3/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, 100, and 1000 are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe3 duplex to auto
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe3/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full, and half are valid parameters.
Example: get fe3 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe3 rate limit to unknown-unicast, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe3
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe3 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe3
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Example: set fe4 status to disable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe4/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe4 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe4/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe4 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe4 pause to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe4/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe4 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe4 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe4/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe4 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe4/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, and 100 are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe4 duplex to auto
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe4/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full, and half are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe4 rate limit to unknown-unicast, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe4
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe4 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Example: set fe4 status to disable
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&status& : &disable&}' https://10.140.44.134/api/1.0/eth/fe4/status
{&success&:&true&,&updatedAt&:& 08:54:26&}
Parameter restrictions
enable and disable are the valid strings for status. Otherwise, 004 error is reported.
Example: get fe4 status
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/status
{&status&:&disable&,&success&:&true&,&getAt&:& 06:33:40&}
Example: set gi1 output-queue-strategy to wrr
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&oqs& : &wrr&}' https://10.140.44.134/api/1.0/eth/fe4/oqs
{&success&:&true&,&updatedAt&:& 06:35:35&}
Parameter restrictions
wrr and strict are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get fe4 output-queue-strategy
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/oqs
{&oqs&:&wrr&,&success&:&true&,&getAt&:& 09:07:08&}
Example: set fe4 pause to on
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&priority& : &normal&}' https://10.140.44.134/api/1.0/eth/fe4/priority
{&success&:&true&,&updatedAt&:& 06:42:18&}
Parameter restrictions
normal and high are the valid strings for oqs. Otherwise, 004 error is reported.
Example: get gi1 priority
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/priority
{&priority&:&normal&,&success&:&true&,&getAt&:& 09:39:52&}
Example: set fe4 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&}' https://10.140.44.134/api/1.0/eth/fe4/rateLim
{&success&:&true&,&updatedAt&:& 06:43:28&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/rateLim
{&rateLim&:&set unknown-unicast 100&,&success&:&true&,&getAt&:& 03:21:16&}
Example: set fe4 rate limit to unknown-unicast
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&speed& : &auto&}' https://10.140.44.134/api/1.0/eth/fe4/speed
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, 10, 100, and 1000 are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/speed
{&speed&:&auto&,&success&:&true&,&getAt&:& 07:03:00&}
Example: set fe4 duplex to auto
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&duplex& : &auto&}' https://10.140.44.134/api/1.0/eth/fe4/duplex
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only auto, full, and half are valid parameters.
Example: get fe4 rate limit
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4/duplex
{&duplex&:&auto&,&success&:&true&,&getAt&:& 01:18:14&}
Example: set fe4 rate limit to unknown-unicast, to pause to off
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{&rateLim& : &set unknown-unicast 100&,&duplex&:&auto&}' https://10.140.44.134/api/1.0/eth/fe4
{&success&:&true&,&updatedAt&:& 09:37:31&}
Parameter restrictions
Only none and set broadcast/unknown-unicast/both [1-100] are valid parameters.
Example: get fe4 information
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/eth/fe4
{&status&:&disable&,&oqs&:&wrr&,&priority&:&normal&,&rateLim&:&set unknown-unicast 100&,&speed&:&auto&,&duplex&:&auto&,&success&:&true&,&getAt&:& 06:47:52&}
Note Curl is used as a sample tool to request APIs. 10.140.44.134 is used as a sample IP address of the Cisco Edge 300 series switch, and cisco123! is used as a sample admin password.
Example: reboot Cisco Edge 300
curl -k -X GET -H 'password: cisco123!' https://10.140.44.134/api/1.0/cmd/reboot
{&reboot&:&true&,&success&:&true&,&getAt&:& 05:10:43&}
Note Curl is used as a sample tool to request APIs. 10.140.44.134 is used as a sample IP address of the Cisco Edge 300 series switch, and cisco123! is used as a sample admin password.
Example: get os version information
curl -k -X}

我要回帖

更多关于 uriah heep 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信