Want to interrogate some interfaces on a Cisco 3650 switch using RESTCONF. If the interface has no forward slashes then its easy...
However, the majority of the interfaces are not like that, e.g. GigabitEthernet1/0/1
How to interrogate one of the 'normal' interfaces, have tried many things but all end with the...
"error-message": "invalid path",
In addition to the forward slash, is there a document/link talking about special characters.
Today you can do it as:
In the future it will be escaped as per standard behaviour
%2F will not work today (native models). It will be in the RFC compliant version of RESTCONF
While using Postman to talk to my 3650 (running 16.5.1) used...
Accept of application/vnd.yang.data+json
Conent-Type of application/vnd.yang.data+json
and when tried..
receives an error, but when tried
Got the interface output
Yes.. (Should have looked more closely at the request, to see it was IETF model)
that is the difference between the IETF and native models.
IETF has interface name with "/" in it as the key is the full interface name e.g. "GigabitEthernet1/0/1"
The native (IOS-XE) model has "GigabitEthernet" as a container and "1/0/1" as the key.
We are in the process of transitioning to RFC-8040, and %2F. Older versions of code will work differently. We do not "officially" support RESTCONF yet, so still a bit of flux.