ROOT is the main entry point for RESTCONF requests. Before
connecting to a RESTCONF server, the root must be determined. Per
the RESTCONF standard, devices implementing the RESTCONF
protocol should expose a resource called /.well-known/host-meta to
enable discovery of ROOT programmatically.
data is the RESTCONF API resource type for data. The operations
resource type is also available for access to RPC operations.
[YANG_MODULE:]CONTAINER is the base mode container being
used.
LEAF is an individual element from within the container.
[?<OPTIONS>] are the options that some network devices may support
that are sent as query parameters that impact the returned results.
These options are optional and can be omitted. The following are some
examples of possible options:
depth = unbounded: If nothing is specified, this option is the
default. It indicates that the returned data should follow the nested
models to the end. Integer values specifying the depth of the data
to be returned are also supported.
content = [all, config, nonconfig]: This query option controls
the type of data returned. If nothing is specified, the default value,
all, is used.
fields = expr: This option limits what leafs are returned in the
response.
Consider the ietf-interfaces YANG model defined in
RFC 8343 and partially presented in Figure 12-5. Using
the data model details, the URIs for RESTCONF requests
can be easily constructed. Generating the code to support
RESTCONF APIs and the mapping of those API calls into
NETCONF can be automated because the mapping from
a YANG data model to a RESTCONF URI is known and
well defined.
Figure 12-5 Mapping Between the YANG Model and
RESTCONF URI