Batch-Provision Multiple, Similar Devices using Scripts

After you have set up a Python interpreter so that you can begin to automate many administrative tasks, and can now fetch tokens automatically, you may now want to automate time-consuming tasks like batch-provisioning many new end-devices at once. This tutorial shows how to do this, as well as query devices, and deprovision devices as well.

Overview of this Tutorial


We will be building a script that:

A typical command may look like:

and will extend the script that was built during the token generation tutorial.

Importing End-Device Provisioning Information


Provisioning a new end-device requires information like:

CSV File for End-Device Parameters


This tutorial uses the standard Python CSV library to parse and import end-device information using the Comma-Separated Values (CSV) format. More information can be found at:

Some disadvantages of CSV are that it is very senstive to changes in the format of the information, and there are many non-standard variants of the format in use.

JSON Files for End-Device Information


Previous Steps


Next Steps