A client can retrieve the capability information from the server by HTTP GET request via WEB browser:
GET /restconf/data/ietf-restconf-monitoring:restconf-state/capabilities HTTP/1.1 Host: example.com Accept: application/yang-data+xml
The server might respond as follows.
HTTP/1.1 200 OK Date: Mon, 23 Apr 2012 17:02:00 GMT Server: example-server Cache-Control: no-cache Pragma: no-cache Last-Modified: Sun, 22 Apr 2012 01:00:14 GMT Content-Type: application/yang-data+xml <capabilities xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> <capability>urn:ietf:params:restconf:capability:depth:1.0</capability> <capability>urn:ietf:params:restconf:capability:with-defaults:1.0</capability> <capability>urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=explicit</capability> <capability>urn:ietf:params:restconf:capability:fields:1.0</capability> <capability>urn:ietf:params:restconf:capability:replay:1.0</capability> <capability>urn:ietf:params:restconf:capability:filter:1.0</capability> <capability>urn:ietf:params:restconf:capability:yang-patch:1.0</capability> </capabilities>
OR, by a curl tool:
> curl http://restconf-dev/restconf/data/restconf-state/capabilities -H "Accept:application/yang-data+json" { "capabilities": { "capability": [ "urn:ietf:params:restconf:capability:depth:1.0", "urn:ietf:params:restconf:capability:with-defaults:1.0", "urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=explicit", "urn:ietf:params:restconf:capability:fields:1.0", "urn:ietf:params:restconf:capability:replay:1.0", "urn:ietf:params:restconf:capability:filter:1.0", "urn:ietf:params:restconf:capability:yang-patch:1.0" ] } }
OR, by yangcli-pro:
yangcli-pro> sget /restconf-state/capabilities Filling container /restconf-state/capabilities: REST Data Reply 5 for session 0 [default]: capabilities { capability urn:ietf:params:restconf:capability:depth:1.0 capability urn:ietf:params:restconf:capability:with-defaults:1.0 capability urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=explicit capability urn:ietf:params:restconf:capability:fields:1.0 capability urn:ietf:params:restconf:capability:replay:1.0 capability urn:ietf:params:restconf:capability:filter:1.0 capability urn:ietf:params:restconf:capability:yang-patch:1.0 }