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.
82 The module name and namespace values for the YANG module using
83 the extension statement are assigned to instance document data
84 conforming to the data definition statements within
87 The substatements of this extension MUST follow the
88 'data-def-stmt' rule in the YANG ABNF.
90 The XPath document root is the extension statement itself,
91 such that the child nodes of the document root are
92 represented by the data-def-stmt substatements within
93 this extension. This conceptual document is the context
94 for the following YANG statements:
104 - instance-identifier data type
106 The following data-def-stmt substatements are constrained
107 when used within a 'yang-data' extension statement.
109 - The list-stmt is not required to have a key-stmt defined.
110 - The if-feature-stmt is ignored if present.
111 - The config-stmt is ignored if present.
112 - The available identity values for any 'identityref'
113 leaf or leaf-list nodes are limited to the module
114 containing this extension statement and the modules
115 imported into that module.
119 rc:yang-data yang-errors {
123 rc:yang-data yang-api {
129 "A grouping that contains a YANG container
130 representing the syntax and semantics of a
131 YANG Patch error report within a response message.";
135 "Represents an error report returned by the server if
136 a request results in an error.";
140 "An entry containing information about one
141 specific error that occurred while processing
142 a RESTCONF request.";
144 "RFC 6241, Section 4.3.";
150 "The transport layer.";
154 "The rpc or notification layer.";
158 "The protocol operation layer.";
162 "The server application layer.";
167 "The protocol layer where the error occurred.";
174 "The enumerated error-tag.";
180 "The application-specific error-tag.";
184 type instance-identifier;
186 "The YANG instance identifier associated
187 with the error node.";
193 "A message describing the error.";
198 "This anydata value MUST represent a container with
199 zero or more data nodes representing additional
208 "Conceptual grouping representing the RESTCONF
213 "Conceptual container representing the RESTCONF
218 "Container representing the datastore resource.
219 Represents the conceptual root of all state data
220 and configuration data supported by the server.
221 The child nodes of this container can be any data
222 resources that are defined as top-level data nodes
223 from the YANG modules advertised by the server in
224 the 'ietf-yang-library' module.";
227 container operations {
229 "Container for all operation resources.
231 Each resource is represented as an empty leaf with the
232 name of the RPC operation from the YANG 'rpc' statement.
234 For example, the 'system-restart' RPC operation defined
235 in the 'ietf-system' module would be represented as
236 an empty leaf in the 'ietf-system' namespace. This is
237 a conceptual leaf and will not actually be found in
246 To invoke the 'system-restart' RPC operation:
248 POST /restconf/operations/ietf-system:system-restart
250 To discover the RPC operations supported by the server:
252 GET /restconf/operations
254 In XML, the YANG module namespace identifies the module:
257 xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
259 In JSON, the YANG module name identifies the module:
261 { 'ietf-system:system-restart' : [null] }
265 leaf yang-library-version {
267 pattern '\d{4}-\d{2}-\d{2}';
272 "Identifies the revision date of the 'ietf-yang-library'
273 module that is implemented by this RESTCONF server.
274 Indicates the year, month, and day in YYYY-MM-DD