Retrieval of the YANG modules is supported. The leaf "schema" must be present in the associated "module" list entry. To retrieve a YANG module, you must first needs to get the URL for retrieving the schema, which is stored in the "schema" leaf.
GET /restconf/data/ietf-yang-library:modules-state/module= brocade-interface,2015-04-04/schema HTTP/1.1 Host: 10.24.12.109 Accept: application/yang-data+xml
HTTP/1.1 200 OK Date: Mon, 23 Apr 2012 17:01:00 GMT Server: example-server Content-Type: application/yang-data <?xml version="1.0" encoding="UTF-8" ?> <ietf-yang-library:schema>http://10.11.12.109/restconf/yang-modules/brocade-interface/2015-04-04 </ietf-yang-library:schema\>
GET http://10.24.12.109/restconf/yang-modules/ brocade-interface/2015-04-04 HTTP/1.1 Host: 10.11.12.109 Accept: application/yang
HTTP/1.1 200 OK Date: Thu, 11 Feb 2016 11:10:31 GMT Server: 10.24.12.109 Content-Type: application/yang module brocade-interface { namespace "urn:brocade.com:mgmt:brocade-interface"; prefix "brocade-interface"; // contents of YANG module deleted for this example... ... ... }