12-04-2017 08:45 PM - edited 03-01-2019 04:03 AM
Hello,
I'm having a problem trying to work out how to navigate the API when a key item in a list contains two leaf entries.
Here's the YANG part of interest:
list ISP_Gateway {
key "ISPGateway Exchange";
leaf ISPGateway {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
leaf Exchange {
type string;
}
<SNIP>
Here's an example of referencing the service from the cli:
services IXP-Peering Perth ISP_Gateway test-isp-gw1 Equinix Peer Harry
Does anyone know the syntax when trying to do this via API GET? I've tried the following which didn't work in POSTMAN:
http://127.0.0.1:8080/api/running/services/IXP-Peering/Perth/ISP_Gateway/test-isp-gw1 Equinix/
http://127.0.0.1:8080/api/running/services/IXP-Peering/Perth/ISP_Gateway/test-isp-gw1%20Equinix/
http://127.0.0.1:8080/api/running/services/IXP-Peering/Perth/ISP_Gateway/test-isp-gw1+Equinix/
http://127.0.0.1:8080/api/running/services/IXP-Peering/Perth/ISP_Gateway/test-isp-gw1/Equinix/
If I set the key to be a single leaf item e.g. 'ISPGateway' then all works fine, i.e.
http://127.0.0.1:8080/api/running/services/IXP-Peering/Perth/ISP_Gateway/test-isp-gw1/Peer/Harry
Any suggestions appreciated.
Many Thanks,
Harry
Solved! Go to Solution.
12-04-2017 09:57 PM
Hi,
Found the syntax, and its basically a comma between the leaf items.
e.g.
Thanks!
Harry
12-04-2017 09:57 PM
Hi,
Found the syntax, and its basically a comma between the leaf items.
e.g.
Thanks!
Harry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide