cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13650
Views
5
Helpful
12
Replies

Network Config Template API/Download

Craiegg
Community Member

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.

image.png

1 Accepted Solution

Accepted Solutions

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

In that list is the network ID for each template.

You then use the normal network APIs to get the configuration.

View solution in original post

12 Replies 12

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

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.

https://www.ifm.net.nz/cookbooks/meraki-backup.html

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:

image.png


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.

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

That API should return the list of templates.

@Philip D'Ath ,

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.

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

In that list is the network ID for each template.

You then use the normal network APIs to get the configuration.

This "solution" is incorrect.

There is NO WAY to achieve what OP is asking for. The API is broken in two places:

  1. Networks should return the currently-bound configuration template, e.g. as a "configurationTemplate" field, but doesn't (https://developer.cisco.com/meraki/api-v1/#!get-network)
  2. There should be a new endpoint:
    1. /organizations/{organizationId}/configTemplates/{configTemplateId}/networkbindings

Ideally, these fixes should be implemented in both v0 and v1.

Author, https://www.nuget.org/packages/Meraki.Api/

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.

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

@Shiyue Cheng ,

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.

Author, https://www.nuget.org/packages/Meraki.Api/

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. 😀

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

@Shiyue Cheng

That's great news - thanks! Where is that documented, please?

Author, https://www.nuget.org/packages/Meraki.Api/

Hi @Shiyue Cheng

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?