API To Get A list Of Network In Template

Solved
AhmedJawad
Getting noticed

API To Get A list Of Network In Template

Hi All, 

 

  Is there an api to  Get A list Of Network In a Template ? like mx appliance template and I need a list of all bounded network in it. 

 

Thank you in advance 

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

Here is some sample code:

def getTemplateId(dashboard,orgId,templateName):
	# Search for the template
	for template in dashboard.organizations.getOrganizationConfigTemplates(orgId):
		if template['name'] == templateName:
			return(template['id'])

	raise SystemExit("Cound not find template: "+templateName)

View solution in original post

3 Replies 3
PhilipDAth
Kind of a big deal
Kind of a big deal

Use getOrganizationNetworks:
https://developer.cisco.com/meraki/api-v1/get-organization-networks/ 
With the filter configTemplateId.

AhmedJawad
Getting noticed

Thank you for reply. Where do i get the configTemplateId from ? 

PhilipDAth
Kind of a big deal
Kind of a big deal

Here is some sample code:

def getTemplateId(dashboard,orgId,templateName):
	# Search for the template
	for template in dashboard.organizations.getOrganizationConfigTemplates(orgId):
		if template['name'] == templateName:
			return(template['id'])

	raise SystemExit("Cound not find template: "+templateName)
Get notified when there are additional replies to this discussion.