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>
13 <mailto:andy@yumaworks.com>
14 Author: Martin Bjorklund
15 <mailto:mbj@tail-f.com>
17 <mailto:kwatsen@juniper.net>";
20 "This module contains conceptual YANG specifications
21 for basic RESTCONF media type definitions used in
22 RESTCONF protocol messages.
23 Note that the YANG definitions within this module do not
24 represent configuration data of any kind.
25 The 'restconf-media-type' YANG extension statement
26 provides a normative syntax for XML and JSON
27 message-encoding purposes.
28 Copyright (c) 2017 IETF Trust and the persons identified as
29 authors of the code. All rights reserved.
30 Redistribution and use in source and binary forms, with or
31 without modification, is permitted pursuant to, and subject
32 to the license terms contained in, the Simplified BSD License
33 set forth in Section 4.c of the IETF Trust's Legal Provisions
34 Relating to IETF Documents
35 (http://trustee.ietf.org/license-info).
36 This version of this YANG module is part of RFC 8040; see
37 the RFC itself for full legal notices.";
43 "RFC 8040: RESTCONF Protocol.";
51 "This extension is used to specify a YANG data template that
52 represents conceptual data defined in YANG. It is
53 intended to describe hierarchical data independent of
54 protocol context or specific message-encoding format.
55 Data definition statements within a yang-data extension
56 specify the generic syntax for the specific YANG data
57 template, whose name is the argument of the 'yang-data'
59 Note that this extension does not define a media type.
60 A specification using this extension MUST specify the
61 message-encoding rules, including the content media type.
62 The mandatory 'name' parameter value identifies the YANG
63 data template that is being defined. It contains the
65 This extension is ignored unless it appears as a top-level
66 statement. It MUST contain data definition statements
67 that result in exactly one container data node definition.
68 An instance of a YANG data template can thus be translated
69 into an XML instance document, whose top-level element
70 corresponds to the top-level container.
71 The module name and namespace values for the YANG module using
72 the extension statement are assigned to instance document data
73 conforming to the data definition statements within
75 The substatements of this extension MUST follow the
76 'data-def-stmt' rule in the YANG ABNF.
77 The XPath document root is the extension statement itself,
78 such that the child nodes of the document root are
79 represented by the data-def-stmt substatements within
80 this extension. This conceptual document is the context
81 for the following YANG statements:
90 - instance-identifier data type
91 The following data-def-stmt substatements are constrained
92 when used within a 'yang-data' extension statement.
93 - The list-stmt is not required to have a key-stmt defined.
94 - The if-feature-stmt is ignored if present.
95 - The config-stmt is ignored if present.
96 - The available identity values for any 'identityref'
97 leaf or leaf-list nodes are limited to the module
98 containing this extension statement and the modules
99 imported into that module.
103 rc:yang-data yang-errors {
107 rc:yang-data yang-api {
113 "A grouping that contains a YANG container
114 representing the syntax and semantics of a
115 YANG Patch error report within a response message.";
119 "Represents an error report returned by the server if
120 a request results in an error.";
124 "An entry containing information about one
125 specific error that occurred while processing
126 a RESTCONF request.";
128 "RFC 6241, Section 4.3.";
134 "The transport layer.";
138 "The rpc or notification layer.";
142 "The protocol operation layer.";
146 "The server application layer.";
151 "The protocol layer where the error occurred.";
158 "The enumerated error-tag.";
164 "The application-specific error-tag.";
168 type instance-identifier;
170 "The YANG instance identifier associated
171 with the error node.";
177 "A message describing the error.";
182 "This anydata value MUST represent a container with
183 zero or more data nodes representing additional
192 "Conceptual grouping representing the RESTCONF
197 "Conceptual container representing the RESTCONF
202 "Container representing the datastore resource.
203 Represents the conceptual root of all state data
204 and configuration data supported by the server.
205 The child nodes of this container can be any data
206 resources that are defined as top-level data nodes
207 from the YANG modules advertised by the server in
208 the 'ietf-yang-library' module.";
211 container operations {
213 "Container for all operation resources.
214 Each resource is represented as an empty leaf with the
215 name of the RPC operation from the YANG 'rpc' statement.
216 For example, the 'system-restart' RPC operation defined
217 in the 'ietf-system' module would be represented as
218 an empty leaf in the 'ietf-system' namespace. This is
219 a conceptual leaf and will not actually be found in
226 To invoke the 'system-restart' RPC operation:
227 POST /restconf/operations/ietf-system:system-restart
228 To discover the RPC operations supported by the server:
229 GET /restconf/operations
230 In XML, the YANG module namespace identifies the module:
232 xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
233 In JSON, the YANG module name identifies the module:
234 { 'ietf-system:system-restart' : [null] }
238 leaf yang-library-version {
240 pattern '\d{4}-\d{2}-\d{2}';
245 "Identifies the revision date of the 'ietf-yang-library'
246 module that is implemented by this RESTCONF server.
247 Indicates the year, month, and day in YYYY-MM-DD