06-22-2019 04:40 PM
Hello, I've been doing some labbing using NSO 5.1.0.1. Currently I am working on understanding the API's and REST vs RESTONF
When GET against this REST API URL I get the output I expect.
curl -u admin:admin 'http://127.0.0.1:8080/api/running/devices/device/ios0' <device xmlns="http://tail-f.com/ns/ncs" xmlns:y="http://tail-f.com/ns/rest" xmlns:ncs="http://tail-f.com/ns/ncs"> <name>ios0</name> !!! output omitted for brevity
However, when I try against what I understand should be equivalent RESTCONF API I get an error...
curl -u admin:admin 'http://127.0.0.1:8080/restconf/data/devices/device=ios0' <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-message>missing module name for 'devices'</error-message> <error-tag>missing-attribute</error-tag> <error-type>application</error-type> </error> </errors>
what am I missing?
Solved! Go to Solution.
06-22-2019 09:12 PM
06-22-2019 09:12 PM
06-24-2019 09:13 AM
To clarify, it is the YANG module name that is used.
It is also possible to configure this required module-name for api-identifiers with /ncs-config/restconf/require-module-name, which is default true.
For more details see ncs.conf(5) man page and RFC 8040 RESTCONF Protocol, Section 3.5.3. Encoding Data Resource Identifiers in the Request URI.
06-23-2019 05:00 AM
ahhh that was it. Thank you!!
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