cisco IOS XE — Example: Configuring the RESTCONF Protocol

PATCH: (Update) Request The following sample PATCH request uses the logging monitor informational command. Device:~# curl -i -k -X "PATCH" "https://10.85.116.30:443/restconf/data/Cisco-IOS-XE-native:native" \ > -H 'Content-Type: application/yang-data+json' \ > -H 'Accept: application/yang-data+json' \ > -u 'admin:admin' \ > -d > "native": { > "logging": { > "monitor": { > "severity": "informational" > } > } > } > }' HTTP/1.1 204 No Content Server: nginx Date: Mon, 23 Apr 2018 15:07:56 GMT Content-Type: text/html Content-Length: 0 Connection: keep-alive Last-Modified: Mon, 23 Apr 2018 15:07:56 GMT Cache-Control: private, no-cache, must-revalidate, proxy-revalidate Etag:

1524-496076-273016 Pragma: no-cache Device:~# GET Request (To Read) The following sample GET request uses the logging monitor informational command. Device:~# curl -i -k -X "GET" "https://10.85.116.30:443/restconf/data/Cisco-IOS-XE-native:native/logging/monitor/severity" \ > -H 'Accept: application/yang-data+json' \ > -u 'admin:admin' HTTP/1.1 200 OK Server: nginx Date: Mon, 23 Apr 2018 15:10:59 GMT Content-Type: application/yang-data+json Transfer-Encoding: chunked Connection: keep-alive Cache-Control: private, no-cache, must-revalidate, proxy-revalidate Pragma: no-cache { "Cisco-IOS-XE-native:severity": "informational" } Device:~# RESTCONF Protocol Example:

Configuring the RESTCONF Protocol RESTCONF Protocol 29