cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1574
Views
15
Helpful
4
Replies

Getting uri keypath not found error when trying to post Loopback interface to ios-xe-mgmt.cisco.com router

dmyooran71221
Level 1
Level 1

Using postman I created a post request with to the url https://ios-xe-mgmt.cisco.com:9443/restconf/data/ieft-interfaces:interfaces with basic authentication of username: developer, password: C1sco12345, header of Content-Type: application/yang-data+json, and a body of {
"ieft-interfaces:interface": {
"name": "Loopback100",
"description": "What's up",
"type": "iana-if-type:softwareLoopback",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "172.16.100.1",
"netmask": "255.255.255.255"
}
]
}
}
}

but I get a URI keypath not found error

{
"errors": {
"error": [
{
"error-message": "uri keypath not found",
"error-tag": "invalid-value",
"error-type": "application"
}
]
}
}

Any help would be much appreciated

1 Accepted Solution

Accepted Solutions

@dmyooran71221 I ran a POST request using

 

https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces

The error you have would indicate that you have a misinformed or wrong URI, but from what you have pasted this looks ok.

 

Screenshot 2021-07-07 at 14.02.44.png

 

{
    "ieft-interfaces:interface": {
        "name": "Loopback100",
        "description": "What's up",
        "type": "iana-if-type:softwareLoopback",
        "enabled": true,
        "ietf-ip:ipv4": {
            "address": [
                {
                    "ip": "172.16.100.1",
                    "netmask": "255.255.255.255"
                }
            ]
        }
    }
}

 

csr1000v-1#sh ip int brief 
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       10.10.20.48     YES NVRAM  up                    up      
GigabitEthernet2       unassigned      YES NVRAM  administratively down down    
GigabitEthernet3       unassigned      YES NVRAM  administratively down down    
Loopback100            172.16.100.1    YES other  up                    up      
csr1000v-1#
csr1000v-1#
csr1000v-1#sh run int lo100
Building configuration...

Current configuration : 93 bytes
!
interface Loopback100
 description What's up
 ip address 172.16.100.1 255.255.255.255
end

I could remove this with 

 

https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces/interface=Loopback100
csr1000v-1#sh ip int brief 
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       10.10.20.48     YES NVRAM  up                    up      
GigabitEthernet2       unassigned      YES NVRAM  administratively down down    
GigabitEthernet3       unassigned      YES NVRAM  administratively down down    

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

4 Replies 4

@dmyooran71221 I ran a POST request using

 

https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces

The error you have would indicate that you have a misinformed or wrong URI, but from what you have pasted this looks ok.

 

Screenshot 2021-07-07 at 14.02.44.png

 

{
    "ieft-interfaces:interface": {
        "name": "Loopback100",
        "description": "What's up",
        "type": "iana-if-type:softwareLoopback",
        "enabled": true,
        "ietf-ip:ipv4": {
            "address": [
                {
                    "ip": "172.16.100.1",
                    "netmask": "255.255.255.255"
                }
            ]
        }
    }
}

 

csr1000v-1#sh ip int brief 
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       10.10.20.48     YES NVRAM  up                    up      
GigabitEthernet2       unassigned      YES NVRAM  administratively down down    
GigabitEthernet3       unassigned      YES NVRAM  administratively down down    
Loopback100            172.16.100.1    YES other  up                    up      
csr1000v-1#
csr1000v-1#
csr1000v-1#sh run int lo100
Building configuration...

Current configuration : 93 bytes
!
interface Loopback100
 description What's up
 ip address 172.16.100.1 255.255.255.255
end

I could remove this with 

 

https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces/interface=Loopback100
csr1000v-1#sh ip int brief 
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       10.10.20.48     YES NVRAM  up                    up      
GigabitEthernet2       unassigned      YES NVRAM  administratively down down    
GigabitEthernet3       unassigned      YES NVRAM  administratively down down    

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Tried it again today and it worked might be an issue with postman I think. Thanks for your help!!

jcohoe
Cisco Employee
Cisco Employee

Can you try this with YANGSuite-RESTCONF plugin instead of Postman ? Is the same happen ?

I was actually wondering how I can get the YANGSuite-RESTCONF plugin the install only come with the NETCONF plugin and I don't see it available to install under admin->manage plugins. I download YANGSuite through pip on windows.