RFC 8040, "RESTCONF Protocol", January 2017Source of RFC: netconf (ops)
Errata ID: 6215
Publication Format(s) : TEXT
Reported By: Kent Watsen
Date Reported: 2020-06-25
Section 4.3 says:
If a retrieval request for a data resource representing a YANG leaf-list or list object identifies more than one instance and XML encoding is used in the response, then an error response containing a "400 Bad Request" status-line MUST be returned by the server. The error-tag value "invalid-value" is used in this case. Note that a non-configuration list is not required to define any keys. In this case, the retrieval of a single list instance is not possible.
This whole paragraph should be removed because, according to Section 3.5 (Data Resource), the "list" and "leaf-leaf" themselves are not a data resources:
A data resource represents a YANG data node that is a descendant node
of a datastore resource. Each YANG-defined data node can be uniquely
targeted by the request-line of an HTTP method. Containers, leafs,
leaf-list entries, list entries, anydata nodes, and anyxml nodes are
No GET, PUT, POST, DELETE, or PATCH example in the RFC illustrates an operation on a "list" or "leaf-list" directly (i.e., without a key, which would then represent an element of the list or leaf-list).