Set Log Path - Cisco 340 Series Configuration Manual

Table of Contents

Advertisement

Chapter 4
Configuring HTTP API
Request
curl -k -X GET -H 'password: cisco123!' https://localhost/api/2.0/sys/log/path
Reply
{"path":"/var/log","success":"true","getAt":"2013-05-08 17:00:25"}

Set Log Path

Example: set log path to /tmp
Request
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{"path" :
"/tmp"}' https://localhost/api/2.0/log/path
Reply
{"success":"true","updatedAt":"2013-05-08 17:12:04"}
Get Log Level
Example: get log level
Request
curl -k -X GET -H 'password: cisco123!' https://localhost/api/2.0/sys/log/level
Reply
{"level":"*","success":"true","getAt":"2013-05-08 17:48:22"}
Set Log Level
Example: set log level to info
Request
curl -k -X PUT -H 'password: cisco123!' -H 'Content-Type: application/json' -d '{"level" :
"info"}' https://localhost/api/2.0/log/level
Reply
{"level":"info","success":"true","getAt":"2013-05-08 17:54:28"}
Get Log Size
Example: get log size
Request
curl -k -X GET -H 'password: cisco123!' https://localhost/api/2.0/log/size
Reply
{"size":"5k","success":"true","getAt":"2013-05-08 17:59:41"}
OL-29491-01
Cisco Edge 340 Series Software Configuration Guide, Release 1.0
Log
4-9

Advertisement

Table of Contents
loading

Table of Contents