10-23-2018 01:09 AM - edited 03-01-2019 04:13 AM
Hi,
I have a package that i call from the rest API like so (package is called vlan)
curl -v -X POST -T vlan.xml -u yale:******** http://localhost:8080/api/config
vlan.xml -
<vlan>
<vl-name>six</vl-name>
<device>nx1</device>
<vlan-id>10</vlan-id>
</vlan>
what is the equivalent call but for RESTCONF
Thanks
Regards
Yale
Solved! Go to Solution.
10-25-2018 08:39 AM - edited 10-25-2018 08:43 AM
Check out https://wwwin-github.cisco.com/nsopl/rest-api-explorer In short, if you know the REST API path, e.g.,
/api/config/devices/device/DEVICE1
the corresponding RESTCONF path is
/restconf/data/devices/device=DEVICE1?content=config
Same payload should work for both.
10-25-2018 08:39 AM - edited 10-25-2018 08:43 AM
Check out https://wwwin-github.cisco.com/nsopl/rest-api-explorer In short, if you know the REST API path, e.g.,
/api/config/devices/device/DEVICE1
the corresponding RESTCONF path is
/restconf/data/devices/device=DEVICE1?content=config
Same payload should work for both.
10-25-2018 09:58 AM
curl -v -X POST -T vlan.xml -u yale:****** http://localhost:8080/restconf/data?content=config
10-25-2018 10:05 AM
Many thanks
Is there a document that explain/details what other options i have for content= etc ?
10-25-2018 10:39 AM
I copied section 4.8.1 from RESTCONF RFC8040 into rest-api-explorer for "content="
02-04-2021 06:35 AM
Check out the NSO user guide, all query parameters are documented there.
https://developer.cisco.com/docs/nso/guides/#!the-restconf-api/query-parameters
02-03-2021 10:25 PM
Hi
i want to enable/install rest api explorer on NSO
Can anyone please help me with require steps to enable same.
Thanks
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