cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
860
Views
0
Helpful
5
Replies

403 Error Cisco-IOS-XE Always On DevNet Sandbox

ko0363
Level 1
Level 1

Recently, I had been trying out POST request on the Cisco IOS-XE always on sandbox, in order to create a new interface using RESTCONF API.

https://devnetsandbox.cisco.com/RM/Topology?c=14ec7ccf-2988-474e-a135-1e90b9bc6cafDevNet

The problem is, I am getting a 403 error code.

 

Quite a while back, I was able to successfully create a POST request (201 Response Code) using the "ietf-interfaces" YANG module (using Postman and Python Script).

https://yangcatalog.org/yang-search/yang_tree/ietf-interfaces

However, this is no longer working (even using the same script which once succeeded).

Is this a issue with the sandbox environment? Any of you having the same problem, or is it working with you guys? The GET request seems to still be working...

5 Replies 5

ko0363
Level 1
Level 1

As a reference, I am attaching the following content for Body (request).

 

{
  "ietf-interfaces:interface": {
    "name""Loopback123",
    "description""Creating a Loopback interface using Python",
    "type""iana-if-type:softwareLoopback",
    "enabled"true,
    "ietf-ip:ipv4": {
      "address": {
        "ip""10.0.0.123",
        "netmask""255.255.255.255"
      }
    }
  }
}
 
For Headers, I used the following:
"Content-Type": "application/yang-data+json"

@ko0363 which XE always on sandbox are you using please, as there is two

 

HOST = 'ios-xe-mgmt-latest.cisco.com'
HOST = 'ios-xe-mgmt.cisco.com'

I am able to run a PUT and GET to 'ios-xe-mgmt-latest.cisco.com' with the following code below to 'ios-xe-mgmt-latest.cisco.com'

 

https://developer.cisco.com/codeexchange/github/repo/bigevilbeard/Interface_Up_Restconf

 

As these are always on Sandbox, it could be other users are using these and this is blocking your use case/testing. Can you test on the alternative XE always-on device.

 

Thanks!

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

@bigevilbeard 

Thank you for your prompt response!

I was using 

'ios-xe-mgmt.cisco.com'

at first and tried using the alternative 

'ios-xe-mgmt-latest.cisco.com

When I changed the endpoint URI, it says that it could not send a response. 

Do you have the link for the information regarding  'ios-xe-mgmt-latest.cisco.com" sandbox? (like credentials, RESTCONF port number, etc)

 

By the way, let me attach my RESTCONF request via postman for "ios-xe-mgmt.cisco.com".
Is there something wrong with the request information?

 

 

スクリーンショット 2021-05-13 092459.pngスクリーンショット 2021-05-13 092442.pngスクリーンショット 2021-05-13 092426.pngスクリーンショット 2021-05-13 092401.png

Sure here is the link https://devnetsandbox.cisco.com/RM/Diagram/Index/7b4d4209-a17c-4bc3-9b38-f15184e53a94?diagramType=Topology

 

The main difference is the port. 

 

Hope this helps!

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

Thanks for the link!

 

It successfully worked on the latest version of CSR1000v, that is, 'ios-xe-mgmt-latest.cisco.com".

However, it is not working on the older version; "ios-xe-mgmt.cisco.com".

(using the same credentials, headers, body, etc)

 

I assume the older version is denying post requests.