3 namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
7 "IETF NETCONF (Network Configuration) Working Group";
10 "WG Web: <https://datatracker.ietf.org/wg/netconf/>
11 WG List: <mailto:netconf@ietf.org>
14 <mailto:andy@yumaworks.com>
16 Author: Martin Bjorklund
17 <mailto:mbj@tail-f.com>
20 <mailto:kwatsen@juniper.net>";
23 "This module contains conceptual YANG specifications
24 for basic RESTCONF media type definitions used in
25 RESTCONF protocol messages.
27 Note that the YANG definitions within this module do not
28 represent configuration data of any kind.
29 The 'restconf-media-type' YANG extension statement
30 provides a normative syntax for XML and JSON
31 message-encoding purposes.
33 Copyright (c) 2017 IETF Trust and the persons identified as
34 authors of the code. All rights reserved.
36 Redistribution and use in source and binary forms, with or
37 without modification, is permitted pursuant to, and subject
38 to the license terms contained in, the Simplified BSD License
39 set forth in Section 4.c of the IETF Trust's Legal Provisions
40 Relating to IETF Documents
41 (http://trustee.ietf.org/license-info).
43 This version of this YANG module is part of RFC 8040; see
44 the RFC itself for full legal notices.";
50 "RFC 8040: RESTCONF Protocol.";
58 "This extension is used to specify a YANG data template that
59 represents conceptual data defined in YANG. It is
60 intended to describe hierarchical data independent of
61 protocol context or specific message-encoding format.
62 Data definition statements within a yang-data extension
63 specify the generic syntax for the specific YANG data
64 template, whose name is the argument of the 'yang-data'
67 Note that this extension does not define a media type.
68 A specification using this extension MUST specify the
69 message-encoding rules, including the content media type.
71 The mandatory 'name' parameter value identifies the YANG
72 data template that is being defined. It contains the
75 This extension is ignored unless it appears as a top-level
76 statement. It MUST contain data definition statements
77 that result in exactly one container data node definition.
78 An instance of a YANG data template can thus be translated
79 into an XML instance document, whose top-level element
80 corresponds to the top-level container.
81 The module name and namespace values for the YANG module using
82 the extension statement are assigned to instance document data
83 conforming to the data definition statements within
86 The substatements of this extension MUST follow the
87 'data-def-stmt' rule in the YANG ABNF.
89 The XPath document root is the extension statement itself,
90 such that the child nodes of the document root are
91 represented by the data-def-stmt substatements within
92 this extension. This conceptual document is the context
93 for the following YANG statements:
103 - instance-identifier data type
105 The following data-def-stmt substatements are constrained
106 when used within a 'yang-data' extension statement.
108 - The list-stmt is not required to have a key-stmt defined.
109 - The if-feature-stmt is ignored if present.
110 - The config-stmt is ignored if present.
111 - The available identity values for any 'identityref'
112 leaf or leaf-list nodes are limited to the module
113 containing this extension statement and the modules
114 imported into that module.
118 rc:yang-data yang-errors {
122 rc:yang-data yang-api {
128 "A grouping that contains a YANG container
129 representing the syntax and semantics of a
130 YANG Patch error report within a response message.";
134 "Represents an error report returned by the server if
135 a request results in an error.";
139 "An entry containing information about one
140 specific error that occurred while processing
141 a RESTCONF request.";
143 "RFC 6241, Section 4.3.";
149 "The transport layer.";
153 "The rpc or notification layer.";
157 "The protocol operation layer.";
161 "The server application layer.";
166 "The protocol layer where the error occurred.";
173 "The enumerated error-tag.";
179 "The application-specific error-tag.";
183 type instance-identifier;
185 "The YANG instance identifier associated
186 with the error node.";
192 "A message describing the error.";
197 "This anydata value MUST represent a container with
198 zero or more data nodes representing additional
207 "Conceptual grouping representing the RESTCONF
212 "Conceptual container representing the RESTCONF
217 "Container representing the datastore resource.
218 Represents the conceptual root of all state data
219 and configuration data supported by the server.
220 The child nodes of this container can be any data
221 resources that are defined as top-level data nodes
222 from the YANG modules advertised by the server in
223 the 'ietf-yang-library' module.";
226 container operations {
228 "Container for all operation resources.
230 Each resource is represented as an empty leaf with the
231 name of the RPC operation from the YANG 'rpc' statement.
233 For example, the 'system-restart' RPC operation defined
234 in the 'ietf-system' module would be represented as
235 an empty leaf in the 'ietf-system' namespace. This is
236 a conceptual leaf and will not actually be found in
245 To invoke the 'system-restart' RPC operation:
247 POST /restconf/operations/ietf-system:system-restart
249 To discover the RPC operations supported by the server:
251 GET /restconf/operations
253 In XML, the YANG module namespace identifies the module:
256 xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
258 In JSON, the YANG module name identifies the module:
260 { 'ietf-system:system-restart' : [null] }
263 leaf yang-library-version {
265 pattern '\d{4}-\d{2}-\d{2}';
270 "Identifies the revision date of the 'ietf-yang-library'
271 module that is implemented by this RESTCONF server.
272 Indicates the year, month, and day in YYYY-MM-DD