08-17-2020 07:29 PM
Hello,
I am looking to download all the network configuration templates that I have created in my Organisation.
At present, the only available API is to download or get the details of Organization Templates and not Network Config templates as per my understanding and reading of the documentation of API V1.
Could someone let me know if there is any other way to do the same or if this is in the pipeline of the API being created.
Attaching a reference image of the same.
Solved! Go to Solution.
08-18-2020 12:32 AM
In that list is the network ID for each template.
You then use the normal network APIs to get the configuration.
08-17-2020 11:59 PM
I don't understand clearly.
You have either an organisation template or a standard network that you use as a template. The standard network is just that - a standard network.
Perhaps check out my backup script.
08-18-2020 12:17 AM
As I am just learning about this, maybe I was not clear enough.
What I have done is created different network templates having different settings. As shown in the image below:
As a safety measure, I would like to have a copy of the settings of each of these templates via API saved onto my local server/system. Just wanted to know if the same is possible.
I have checked the /organizations/{organizationId}/configTemplates endpoint but this does not show me the output in the image and the settings of each of those networks.
Hope this provides some clarity into the situation.
@Philip D'Ath for some reason, when I run that script in cmd, it just throws a blank output with no error etc.
08-18-2020 12:22 AM
That API should return the list of templates.
08-18-2020 12:30 AM
For some weird reason it doesn't, it just returns a list of those 4-5 templates, but not the configurations of those templates and the rules set to apply to the devices within them. I'm not at my desk at the moment. But I'll send a grab of the output as soon as possible.
If you have any suggestions, would be welcomed.
08-18-2020 12:32 AM
In that list is the network ID for each template.
You then use the normal network APIs to get the configuration.
10-20-2020 06:24 AM
This "solution" is incorrect.
There is NO WAY to achieve what OP is asking for. The API is broken in two places:
Ideally, these fixes should be implemented in both v0 and v1.
10-20-2020 02:41 PM
You can get the orgs of a network to see which networks are bound to which templates. As for retrieving the configs of templates (or networks/devices), you will need to make multiple API calls. Here's an example solution that does this.
10-20-2020 05:05 PM
Do you mean the networks of an organization?
/organizations/{organizationId}/networks ?
This returns (e.g.) the following:
[ { "id": "L_123456", "organizationId": "2930418", "name": "Long Island Office", "timeZone": "America/Los_Angeles", "tags": [ "tag1", "tag2" ], "productTypes": [ "appliance", "switch", "wireless" ], "enrollmentString": "long-island-office" } ]
Please point out which of these returned fields represents the Configuration Template associated with "Long Island Office"?
As far as I can see, this does NOT contain information about the associated Configuration Template.
10-20-2020 09:20 PM
Yes, networks of an org, I misspoke/mistyped there. The sample response doesn't include configTemplateId because it's an example of a network that's not bound to a template, but for those networks that are bound to a template, that field is returned. Try it out and you'll see. 😀
10-21-2020 01:45 AM
That's great news - thanks! Where is that documented, please?
10-21-2020 01:00 PM
12-06-2020 02:38 AM
I am looking to achieve the same thing, I want to retrieve the configurations (vlan subnets, firewall rules, etc) from multiple configuration templates. I tried running the backup_configs.py and I got the vlans id list back and the DHCP settings although I didn't get the vlan subnets back. Is this achievable?
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