01-28-2025 02:58 AM
Hi there,
So, i have a organization, inside that organization i've created a network with no equipment (manually in the portal), but with some configuration. like an SSID name etc, just to do some testing.
Then I have a frontend system that searches for existing organization, and if there is a match, it checks if the network ID exsists. If the network ID does not exsist in the meraki portal, it gives you an option to create a new one, and clone the configuration from the network chosen.
Now, it creates the network, but the configuration on the new network is lost.
After some troubleshooting, I realised that it need to have the same excact products as the network iam trying to copy.
So, I created a function that checks what products the network i want to clone has first, and then uses the same products when creating the new network, but still, the configuration is lost.
Full Payload: { "name": "randomnetworkID", "timeZone": "Europe/Oslo", "notes": "Network created for organization somenumberhere", "copyFromNetworkId": "L_3702521000000000000", "productTypes": [ "appliance", "camera", "cellularGateway", "sensor", "switch", "wireless" ] }
Iam about to loose my mind, does anyone have some tips? I think it might still be related to the productTypes.
some screenshots;
Any help, much appreciated!
01-28-2025 05:08 AM
I often create new networks with API calls, even if there are no devices inside the network, the configuration will be build correctly.
As soon as you add your devices in the new network, you can see that the settings are correctly set...
You should get your new network configuration via api too
01-28-2025 05:32 AM
Okey, but howcome I can see the configuration when I manually clone, and not when I use the API call?
01-28-2025 06:51 AM
I do not understand the API response.
This is my payload:
Request Payload: {
"name": "blabla",
"productTypes": [
"appliance",
"camera",
"cellularGateway",
"sensor",
"switch",
"wireless"
],
"copyFromNetworkId": "L_2321321323312"
}
and this is my response:
Response Body: {
"network": {
"enrollmentString": null,
"id": "L_3213213213213",
"isBoundToConfigTemplate": false,
"isVirtual": false,
"name": "blabla",
"notes": "",
"organizationId": "32132132321321",
"productTypes": [
"appliance",
"switch",
"wireless"
],
"tags": [],
"timeZone": "Europe/Oslo",
"url": "https://n577.meraki.com/blabla"
},
"success": true
}
so to me, it seems like
"camera",
"cellularGateway",
"sensor",
never gets provisioned, and I guess this is the problem here?
If I use API to pull network info from a API-created subs, it looks like this:
"productTypes": [
"appliance",
"switch",
"wireless"
],
if I clone it in the meraki portal, it looks like this:
"productTypes": [
"appliance",
"camera",
"cellularGateway",
"sensor",
"switch",
"wireless"
],
01-28-2025 01:30 PM
It may be the settings are cloned but not visible via the API until you add a device to the network.
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