Clone existing network configuration while creating a new network through dashboard api

Ritish
Comes here often

Clone existing network configuration while creating a new network through dashboard api

Hello,

 

I want to clone an existing network configuration while creating a new network in an organisation through dashboard API. Could not find any existing api to do that?

 

Ritish_1-1574756576202.png

 

 

The Third step is not getting done with the help of api.

 

Thanks.

12 REPLIES 12
Raphael_M
Here to help

Hello Ritish,

 

There is an option to do that using the Dashboard API.

Use the "Create a new network" endpoint and put the network id of the network you want to clone in the payload:

def payload = [
name: xxx,
type: xxx,
timeZone : xxx,
tags: xxx,
copyFromNetworkId: network_id
]

 

Nice find @Raphael_M . Strangely enough, it's documented in this version of the API docs:

https://dashboard.meraki.com/api_docs#create-a-network

 

But not in the postman version of the docs:

https://documenter.getpostman.com/view/7928889/SVmsVg6K?version=latest#48402daa-6abb-4da6-b5bd-68f1f...

 

Strange indeed...

The postman collection does shows the parameter, so I guess it's only missing in the Postman docs

Raphael_M_0-1574766268394.png

 

That's even weirder, because I'm actually looking at the postman collection here too.

 

Here's what it looks like for me:

image.png

 

Do you have a link for the one you're using? I'm using the postman.meraki.com one.

It seems like the postman collection is completely broken 😥

 

I think that I was using an old version of the collection (few weeks old maybe) because now that I have updated it (using postman.meraki.com, same as you) I see some very weird things:

  • There is no description associated to each endpoint anymore you are right
  • The parameters in the URL start with a colon (eg ":networkId") instead of behing put between two brackets like before : "{{networkId}}", so Postman is not able to interpret them as parameters anymore
  • Headers seem to be empty, while they used to contain at least the "application/content" and the "X-Cisco-Meraki-API-Key" keys

 

Not sure to whom this should be reported to...

Nash
Kind of a big deal

PhilipDAth
Kind of a big deal
Kind of a big deal

Hijacking the thread slightly; the "official" node.js library is called "lib".  Who's crazy idea was it to publish an official SDK to the Internet and call it "lib".  Imagine if every person out there did that.

 

https://developer.cisco.com/meraki/api/#/rest/guides/node-js-sdk-quick-start 

Nash
Kind of a big deal


@PhilipDAth wrote:

Hijacking the thread slightly; the "official" node.js library is called "lib".  Who's crazy idea was it to publish an official SDK to the Internet and call it "lib".  Imagine if every person out there did that.

 

https://developer.cisco.com/meraki/api/#/rest/guides/node-js-sdk-quick-start 


Could be worse. There's a data analysis framework called... ROOT.

there was a typo in the node js syntax. It has been corrected.

const meraki = require('meraki');

>there was a typo in the node js syntax. It has been corrected.

 

That was quick @DexterLaBora !

@Nash 
Semantically versioned, OAS generated API docs:  https://developer.cisco.com/meraki/api/

Classic API docs: https://dashboard.meraki.com/api_docs


By using the semantic version, we have a clearer way to document, create SDKs and ensure compatibility with changes. The classic docs will eventually go away, or convert to an OAS generated version. 

Get notified when there are additional replies to this discussion.