Subject: [Netconf] retrieving list keys in RESTCONF

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 15 Feb 2017 13:25:09 +0100

Hi,

given that a whole list is not a resource in RESTCONF (see https://www.ietf.org/mail-archive/web/netconf/current/msg11047.html), I am wondering if there is any possibility to retrieve values of keys for all list entries that exist in a datastore, e.g. using the "fields" parameter.

This is important because it may be the only feasible way for a client to get to a particular list entry.

Thanks, Lada

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 15 Feb 2017 13:33:44 +0100 (CET)

Ladislav Lhotka <[email-masked]> wrote:
> Hi,
> 
> given that a whole list is not a resource in RESTCONF (see
> https://www.ietf.org/mail-archive/web/netconf/current/msg11047.html),
> I am wondering if there is any possibility to retrieve values of keys
> for all list entries that exist in a datastore, e.g. using the
> "fields" parameter.

Yes, see appendix B.3.3 in RFC 8040 for an example.

/martin

> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 15 Feb 2017 13:49:24 +0100

> On 15 Feb 2017, at 13:33, Martin Bjorklund <[email-masked]> wrote:
> 

OK, thanks. So if I understand it correctly

GET /restconf/data/ietf-yang-library:modules-state/module/name

is illegal (keys for the "module" list must be given)

but

GET /restconf/data/ietf-yang-library:modules-state/?fields=module(name)

is permitted.

Lada

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 15 Feb 2017 13:55:23 +0100 (CET)

> is illegal (keys for the "module" list must be given)

Yes.

> GET /restconf/data/ietf-yang-library:modules-state/?fields=module(name)

Yes.

/martin