07-19-2020 11:33 PM
Hello,
I'm wondering how to remove elements of the config of a switch through RESTCONF.
For example, I can add a class-map with RESTCONF by sending a PATCH, PUT or POST to this URL "data/Cisco-IOS-XE-native:native/policy", with this data:
{ 'Cisco-IOS-XE-native:policy': { 'Cisco-IOS-XE-policy:class-map': [{ 'description': 'Test class-map', 'name': 'test-cmap', 'match': { 'vlan': { 'value': ['123'] } }, 'prematch': 'match-any' } ], } }
But how to deleted it ?
If I send the same command with the method DELETE, I get an error 404 "Operation not allowed."
I was unable to find any example of DELETE command with RESTCONF on internet, I have the same problem with policy-map or VLAN.
Thank in advance for the help,
Olivier
Solved! Go to Solution.
07-20-2020 06:10 AM
Finally I found myself.
For information:
Like on CLI, take care of the order when deleting commands (first policy-map, after class-map) !
If the name of policy-map or class-map contains a '/', it has to replaced by '%2F'.
07-20-2020 06:10 AM
Finally I found myself.
For information:
Like on CLI, take care of the order when deleting commands (first policy-map, after class-map) !
If the name of policy-map or class-map contains a '/', it has to replaced by '%2F'.
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