cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
204
Views
0
Helpful
1
Replies

Catalyst 9300 REST API - Configure-Replace

shmulikh
Visitor

Hey everyone 👋

I'm working on a project where I'm using my own software to communicate with a Cisco Catalyst 9300 switch via REST API calls. Most operations have been working smoothly, but I've hit a wall trying to execute a CONFIGURE REPLACE operation through the REST interface.

Has anyone dealt with this before? I'd love to hear how you approached it — whether you found a working endpoint, a workaround, or even ended up going a different route altogether.

Any insights or experiences would be greatly appreciated! 🙏

#Cisco #NetworkAutomation #RestAPI #Catalyst9300 #NetworkProgrammability

1 Reply 1

johnsmithe086
Community Member

Hey 👋

Yeah, this is a known limitation. On the Cisco Catalyst 9300, the REST interfaces (like RESTCONF / NETCONF) are mainly designed for structured config changes, not full CLI-style operations like configure replace.

👉 That command is more of a CLI-driven workflow, so you usually won’t find a direct REST endpoint for it.

What you can do instead:

1. Use CLI via API (best workaround)

  • Use SSH automation with tools like Ansible or Python Paramiko
  • Run configure replace just like you would manually
    ✔ This is the most reliable approach

2. Use NETCONF for config management

  • With NETCONF, you can:
    • Push full configs
    • Use candidate + commit model
      ✔ More “API-like” but still structured (not exact replace behavior)

3. EEM Script workaround

  • Create an Embedded Event Manager (EEM) script on the switch
  • Trigger it remotely (via API or CLI)
    ✔ Useful if you want semi-automation inside the device

Reality check

If your goal is full config replace, REST alone isn’t enough here. Most engineers still mix:

  • REST/NETCONF → for small changes
  • SSH/CLI → for full replacements

Simple takeaway

👉 REST = structured changes
👉 CLI = full control (like configure replace)