12-08-2025 10:39 AM
I'm working on some automation scripting and have figured out most of what I need except I can't figure out how to connect a network to a device. I have a script to get the details of an existing device and it shows a "networkId": "L_XXXXXXXXXXXXXX".
"networkID" is not listed in the schema on Update Device - Meraki Dashboard API v1 - Cisco Meraki Developer Hub so is this possible to do or is there another API call I should be using instead?
If I try to update a device with a PUT and using a "networkId": "L_YYYYYYYYYYYYY" I get
Status Code: 400
Response Text: {"errors":["Error for /devices/{serial}: None of the fields ('name', 'tags', 'lat', 'lng', 'address', 'notes', 'moveMapMarker', 'switchProfileId' or 'floorPlanId') were specified."]}
12-08-2025 10:46 AM
You will have to remove it from the existing network https://developer.cisco.com/meraki/api-v1/remove-network-devices/ back into inventory and then assign it to the new network using https://developer.cisco.com/meraki/api-v1/claim-network-devices/
12-08-2025 11:22 AM
The network and device I'm testing with are not part joined to any other device/network yet. In the example above I am able to see the 'networkId' if I look at an existing device that is already setup.
In the link you posted that shows 'networkId' as required but does not show that field in any of the examples or Schema Definition. That page looks the same as Claim Into Organization Inventory - Meraki Dashboard API v1 - Cisco Meraki Developer Hub to Claim a device into the inventory. I already have it in my inventory I just need to link it with a network.
12-08-2025 11:25 AM
Oh I just spotted the 'networkId' as part of the API path. Let me test that.
12-08-2025 11:51 AM
bingo 😉 glad it worked! That construct of the API path being part of the context for the action is consistent in the API
12-08-2025 11:34 AM
That worked. Thanks
The title 'Claim Network Devices' sounds way too similar to the other document of trying to claim it into the Inventory.
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