05-12-2021 06:36 AM
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...
05-12-2021 06:39 AM
As a reference, I am attaching the following content for Body (request).
05-12-2021 07:48 AM
@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!
05-12-2021 05:28 PM
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?
05-13-2021 12:14 AM
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!
05-13-2021 12:47 AM
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.
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