问题
Is it possible to send a single request of creating multiple resources at the top-level to a RESTCONF server?
For example, consider the following YANG module:
module example-foomod {
namespace "http://example.com/foomod";
prefix "foomod";
container top {
container under1{
leaf foo {
type uint8;
}
}
container under2{
leaf bar {
type uint8;
}
}
}
}
Can I send the following request to create two resources one time? Or Must I create one resource at a time?
POST /restconf/data/example-foomod:top
payload is:
{
"example-foomod:under1": {
"foo": 54
},
"example-foomod:under2": {
"bar": 45
}
}
I didn't find answer in RFC7951. It seems like all examples in that RFC are single resource, like in section4.
来源:https://stackoverflow.com/questions/52946437/json-encoding-of-payload-to-restconf-server-for-multiple-resources-creation