Skip to main content
Cisco Meraki

Renaming Systems Manager Client Devices with a .csv and Meraki API using Postman Runner

Renaming devices one at a time can be performed on the Meraki Dashboard in the Systems Manager > Clients page UI. However, more complex tasks, such as renaming devices on a mass scale, can be completed with the steps in this guide in conjunction with the powerful Meraki Dashboard API. This will allow you to rename all (or a subset of) devices to a name of your choosing with a .csv file of desired names. 

Be sure to enable the Meraki API in your Organization prior to completing these steps. You will need your Meraki Organization's API key (X-Cisco-Meraki-API-Key) to perform these steps. 

 

1. Create a .csv file containing the top columns: serial & name. Add the enrolled devices' serial numbers and the desired names in the rows under these columns. An example .csv table is provided below. For further convenience a sample .csv can be downloaded here as an example: name-change-data.csv Feel free to use this file and fill in your devices' serial numbers & desired names. 

serial name
DM7S3SERIALNUMBERG5XT My-iPad-1
DRPS4SERIALNUMBERG7VE My-iPad-2
DMPX4SERIALNUMBERGCVF My-iPad-3

 

2. Download and install Postman. Postman is a tool to send API requests, and helps make this process very easy. Postman will be used to filter through the .csv and send multiple API requests automatically, so that devices' names can be changed on a mass scale. 

We will be using Postman's Runner feature to read the .csv and send the multiple API requests to change devices' names. For more information about the Postman Runner feature with .csv files, see the related Postman documentation

 

3. Open Postman and create a new Request. Name your new Request, Create a Collection, and then save this new Request to the new Collection. 
postman-collection.png
 

4. Change the request type to the following: 

[PUT] https://api.meraki.com/api/v1/networks/{networkId}/sm/devices/fields?serial={{serial}}&deviceFields={"name":"{{name}}"}

Note: serial and name are variables which will be filled in with our .csv during the Postman Runner requests to Meraki API in step 5. However, you will need to know your Organization's network_id to fill it in for the request on your network.

 

If you are unsure of your network_id, you will need to use two API calls. First, you will need to discover your OrganizationID using this API endpoint (with X-Cisco-Meraki-API-Key):

[GET] https://api.meraki.com/api/v1/organizations 

With the response from above endpoint you should have your OrganizationID. Now you can use the following endpoint to find all of the network_ids within that OrganizationID:

[GET] https://api.meraki.com/api/v1/organizations/{organizationId}/networks

The response from the above endpoint will return all network_ids within your OrganizationID.

 

Click on Headers and fill in the value for your X-Cisco-Meraki-API-Key. Click on Body and check 'x-www-form-urlencoded.' The request should look like this: 

clipboard_e3e86d37521c51374de93dc36508b2b4d.png

 

5. Go to File > New > Runner Window. This will launch the Postman Collection Runner. Choose the Request/Collection created in Step 3. Choose the number of iterations that are needed. The number of iterations are the number of API requests that will be sent & should match the number of rows in your .csv (IE the number of devices' names to change). Upload the .csv with your serial and name data. When everything looks good, click Run. 

runner-settings.png

 

6. After the process completes for all the iterations you will see something similar to the screenshot below. At this point the devices' names will have changed on your Meraki Dashboard to the name specified for that device's serial number in the .csv. Congratulations & enjoy using this powerful feature! 
Screen Shot 2018-02-21 at 1.17.48 PM.png

  • Was this article helpful?