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.
35 Copyright (c) 2017 IETF Trust and the persons identified as
36 authors of the code. All rights reserved.
38 Redistribution and use in source and binary forms, with or
39 without modification, is permitted pursuant to, and subject
40 to the license terms contained in, the Simplified BSD License
41 set forth in Section 4.c of the IETF Trust's Legal Provisions
42 Relating to IETF Documents
43 (http://trustee.ietf.org/license-info).
45 This version of this YANG module is part of RFC 8040; see
46 the RFC itself for full legal notices.";
52 "RFC 8040: RESTCONF Protocol.";
60 "This extension is used to specify a YANG data template that
61 represents conceptual data defined in YANG. It is
62 intended to describe hierarchical data independent of
63 protocol context or specific message-encoding format.
64 Data definition statements within a yang-data extension
65 specify the generic syntax for the specific YANG data
66 template, whose name is the argument of the 'yang-data'
69 Note that this extension does not define a media type.
70 A specification using this extension MUST specify the
71 message-encoding rules, including the content media type.
73 The mandatory 'name' parameter value identifies the YANG
74 data template that is being defined. It contains the
77 This extension is ignored unless it appears as a top-level
78 statement. It MUST contain data definition statements
79 that result in exactly one container data node definition.
80 An instance of a YANG data template can thus be translated
81 into an XML instance document, whose top-level element
82 corresponds to the top-level container.
84 The module name and namespace values for the YANG module using
85 the extension statement are assigned to instance document data
86 conforming to the data definition statements within
89 The substatements of this extension MUST follow the
90 'data-def-stmt' rule in the YANG ABNF.
92 The XPath document root is the extension statement itself,
93 such that the child nodes of the document root are
94 represented by the data-def-stmt substatements within
95 this extension. This conceptual document is the context
96 for the following YANG statements:
106 - instance-identifier data type
108 The following data-def-stmt substatements are constrained
109 when used within a 'yang-data' extension statement.
111 - The list-stmt is not required to have a key-stmt defined.
112 - The if-feature-stmt is ignored if present.
113 - The config-stmt is ignored if present.
114 - The available identity values for any 'identityref'
115 leaf or leaf-list nodes are limited to the module
116 containing this extension statement and the modules
117 imported into that module.
121 rc:yang-data yang-errors {
125 rc:yang-data yang-api {
131 "A grouping that contains a YANG container
132 representing the syntax and semantics of a
133 YANG Patch error report within a response message.";
137 "Represents an error report returned by the server if
138 a request results in an error.";
142 "An entry containing information about one
143 specific error that occurred while processing
144 a RESTCONF request.";
146 "RFC 6241, Section 4.3.";
152 "The transport layer.";
156 "The rpc or notification layer.";
160 "The protocol operation layer.";
164 "The server application layer.";
169 "The protocol layer where the error occurred.";
176 "The enumerated error-tag.";
182 "The application-specific error-tag.";
186 type instance-identifier;
188 "The YANG instance identifier associated
189 with the error node.";
195 "A message describing the error.";
200 "This anydata value MUST represent a container with
201 zero or more data nodes representing additional
210 "Conceptual grouping representing the RESTCONF
215 "Conceptual container representing the RESTCONF
220 "Container representing the datastore resource.
221 Represents the conceptual root of all state data
222 and configuration data supported by the server.
223 The child nodes of this container can be any data
224 resources that are defined as top-level data nodes
225 from the YANG modules advertised by the server in
226 the 'ietf-yang-library' module.";
229 container operations {
231 "Container for all operation resources.
233 Each resource is represented as an empty leaf with the
234 name of the RPC operation from the YANG 'rpc' statement.
236 For example, the 'system-restart' RPC operation defined
237 in the 'ietf-system' module would be represented as
238 an empty leaf in the 'ietf-system' namespace. This is
239 a conceptual leaf and will not actually be found in
248 To invoke the 'system-restart' RPC operation:
250 POST /restconf/operations/ietf-system:system-restart
252 To discover the RPC operations supported by the server:
254 GET /restconf/operations
256 In XML, the YANG module namespace identifies the module:
259 xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
261 In JSON, the YANG module name identifies the module:
263 { 'ietf-system:system-restart' : [null] }
267 leaf yang-library-version {
269 pattern '\d{4}-\d{2}-\d{2}';
274 "Identifies the revision date of the 'ietf-yang-library'
275 module that is implemented by this RESTCONF server.
276 Indicates the year, month, and day in YYYY-MM-DD