- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-29-2020 04:36 AM
Hi Folks,
I want to save and export new named configuration snapshot through API call.
I found the API but don't know whether it export the latest details or old one, In UI we have option to save and export the saved configuration but unable to find with API.
Can anyone help me if you already find out the way to export?
Also want to export Device group name but when i go to the API , it fetch all information including device name, it is really tough to fetch on Devicegroup.
Thanks in advance
10-09-2020 03:48 AM
Have you tried below API call ?
/api/?type=export&category=configuration
10-27-2020 02:51 AM
Hi @SutareMayur
I believe the below api will only export the configuration, Does it export latest configuration?
like we mostly manually save the named configuration then export it
07-04-2022 02:45 AM
There are a lot differences I can see when I download named configuration with API.
Is there any way to grab the exact named configuration same as we download from portal.
Appreciate your help.
09-13-2022 08:41 AM
There are a few options for getting the running/live config via API, and it depends exactly what you want, there is nuance between the options, and based on this thread so far I'm not sure which is most appropriate, so I will share them all and let you decide which one meets your requirements:
https://{{host}}/api/?key={{key}}&type=config&action=show
https://{{host}}/api/?key={{key}}&type=op&cmd=<show><config><running></running></config></show>&target={{managed-device-serial}}
https://{{host}}/api/?key={{key}}&type=export&category=configuration
Saving the running config as a named "snapshot" can be done with:
https://{{host}}/api/?key={{key}}&type=op&cmd=<save><config><to>{{config-snapshot-name}}</to></config></save>
Hope that helps!
09-22-2022 10:19 AM
@JimmyHolland , Yes these are really helpful.
But the format we export using API and from Portal is totally different.
I am running another python script to grab some inside details and i am able to fetch that when i used manually downloaded configuration file.
But exported is totally different.
Any other way to download configuration file same as manually downloaded one.
Thanks In advance
09-24-2022 12:11 PM
@Srikant I believe the command you're looking for is below. This will download the previously saved config snapshot with the expected formatting.
https://{{host}}/api/?key={{key}}&type=op&cmd=<show><config><saved>{{config-snapshot-name}}</saved></config></show>
10-20-2022 05:01 AM
Appreciate your help @JimmyHolland
10-20-2022 05:02 AM
@Wayne_Brill Thank you so much, I was looking the same.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!