I haven't heard anyone talk about using the Configurator 2 command line tools with the JSS API, so I wanted to share this proof-of-concept/demo for a tool I made for my environment.
Video: Casfigurator - Combining the JSS API with Configurator 2
Demo starts around the 2 minute mark.
The backstory is that after moving our 4000 iPads over from another MDM last summer, it became apparent that setting up non-user-based iPads needs to borrow a bit (or a lot) more from the Mac-"imaging" side of the house. In theory, it seemed pretty simple: make a mobile device extension attribute populated with keywords that tied back to smart groups, which had groups of like-apps scoped to them (i.e. - make the munki client identifier for iPads). This way, a technician could be tasked with setting up a cart of iPads with known groups of apps (GoogleDriveApps, iLifeApps, FirstGrade, etc.) without having to set scopes in the JSS by device name or whatever criteria we could shoehorn in to working.
The problem was getting that information onto the device record by a setup-tech/non-tech-acting-as-such, at the time of setup, usable for devices that have never been in the JSS and all without requiring much extra effort from the tech.
Luckily, some new things this past year made that possible:
Device Based VPP Assignment
Sharing the Supervision Identity between Configurator 2 and the JSS
Configurator 2 command line tools
That last one has a lot of great potential. If you're not aware of the new command line tools that are available with Configurator 2, you really should be. The biggest problem in trying to come up with a "traditional" script to accomplish my goals was making sure the setup person was only affecting the intended devices—not really possible given our quantities without the use of serial numbers in a CSV. And creating a CSV would just lead to more iPad related frustration and fatigue... Now, they can just plug devices into a Mac running Configurator, Configurator will supply the input to the script, and the script will put the data on the JSS.
We can go the other way too!
I'll leave a few resources on Configurator Automation here:
https://developer.apple.com/videos/play/wwdc2015/306/?time=2019
"Supporting the Enterprise with OS X Automation" (cut to configurator 2 part in link)
Sal Soghoian's session at WWDC 2015 which demonstrates Configurator 2 Automation
https://configautomation.com
A website "not hosted by Apple Inc," (pretty sure it's done independently by Soghoian's team) but is the defacto guide for Configurator 2 Automation.
https://github.com/bumbletech/casfigurator
My github, which has some of my demo "Casfigurator" scripts. Due to the use of extension attributes, some will be easier to work into new environments than others. (Documentation under improvement...)
