Posted on 02-11-2016 01:29 PM
Hey JAMFers!
We are auditing our iPad Apps and doing a complete overhaul/refresh this summer. Our prep work for our summer projects is starting now. We wipe and reload our iPads and this summer we are really looking forward to leveraging Casper to do the heavy lifting. Of course, this comes with some prep work.
We want to inventory our apps
-- device assignable
-- paid or free
--- if paid, what are we looking at financially
Part of this inventory is requesting our teachers to go through the list and determine which apps they want. Then we will verify if it is device assignable, paid or free, etc.
In Casper you can perform the following:
-- Mobile Devices -> Search Inventory -> (Drop Down) Mobile Device Apps -> * (wild card for both app and version) -> Search
This will list all your apps. Now, the question:
How can I export this list?
-- or --
Does anyone have any other ideas?
Thank you All in advance!
Posted on 02-11-2016 02:56 PM
I don't see a straightforward way of getting this from the front end. It looks like you could pull a file dump from the API by pulling mobile device info from the "/mobiledevices" entry into xml and then parsing out the application information. I looked at the "/mobiledeviceapplications" key and only saw apps that are listed in the JSS, the mobiledevices key shows what is polled from the devices. I don't have my scripting boots on right now, but I can try to put something together and post it up here.
Posted on 02-11-2016 05:20 PM
I can't get to this right away but to get started you can call up the mobiledevices api to get a total count of your devices, then cycle through all of the mobile devices by ID using the total count number and from that create an file that holds the mobile_device/applications/application_name text from each device ID. Kind of like this:
#!/bin/sh
# get a total number of devices
curl -v -k -u $jssAPIUsername:$jssAPIPassword $jssAddress/JSSResource/mobiledevices -X GET > /tmp/allmobiledevices.xml
# then get the size out of that file
numOfmobileds=`cat /tmp/allmobiledevices.xml | xpath //mobile_devices/size |sed s/<size>//g| sed s/<\/size>//g`
#set index to zero
index=0
# Create an XML to put the application information into a text file
while [ $index -lt $numOfmobilds ]
do
#create an xml of a mobile device by JSS ID
index=$[$index+1]
mobileid=`cat /tmp/allmobiledevices.xml | xpath //mobiledevices/mobile_device[$index]/id |sed s/<id>//g | sed s/<\/id>//g`
curl -v -k -u $jssAPIUsername:$jssAPIPassword $jssAddress/JSSResource/computers/id/$mobileid -X GET > /tmp/mobiledev.xml
#find the application field from the mobiledev.xml and parse out the data
I am out of time today, but you should be able to take the output and write it to a text file and continue the cycle until you run out of device ID's. If I am barking up the wrong tree here, please chime in and let me know. I will try to work on this as time permits. Once you have the data file (text, csv, etc) you can then pump it into Excel and clean up as there will be duplicates. You could also pull version numbers at the same time if you choose to it is under mobile_device/applications/application_version.
Posted on 02-11-2016 05:30 PM
or, you could drag select the list of apps from you search and copy paste into excel...... that sounds easier. I guess I should have tried that first. I have about 10k apps in my list from device inventory so it took a few minutes to populate the cells. My first attempt was a select all on the web page and that didn't go so well on the paste side of things
Posted on 02-12-2016 11:24 AM
Thanks! @pat.best
I appreciate your time! The scripting part is a little over my head. So, I might need step-by-step instructions. I did try to copy into excel, it isn't bad but isn't great.
Any help or assistance is always welcome.
Posted on 02-15-2016 02:20 PM
I was considering our options and I think this might take you where you want to go without getting overly "scripty". This option does require that you have access to the database to make direct queries so if you aren't in charge of your DB you will want to get that person involved here too. I use a program call MySQL Workbench to give me a GUI front end to be able to pull this type of information without resorting to API scripting. One of the best features about this program is the ability to export just about any select query to a CSV file. Here is the query I used to get the data you requested:
select application_name, application_version, count(*)
from `JAMF_DB_NAME`.`mobile_device_installed_applications`
group by application_name, application_version
order by application_name asc;
This will show you application title, the version of that title and the quantity of that combination in your deployment sorted by application name. Once you have your result, click the export button and away you go. If you don't have direct access to your DB, your DBA should be able to look at this and know what is being requested and can generate a report for you. I hope this helps!!
Posted on 02-17-2016 07:23 AM
Thank you! @pat.best
I appreciate you looking into this. I do have access to the DB and will follow your instructions. Give me a few and I will post back with an update.
Lee
Posted on 02-17-2016 01:42 PM
Very low tech: You should be able to select the text within the table, copy, and paste right into a spreadsheet application. I have done that a number of times. This works for me in Safari + Excel.
Also, depending on how things go with your list, know that there is an iTunes API that could get you additional insight.
Cheers!
Brad
Posted on 04-04-2016 01:47 PM
I do apologize for my late response. There is another way we can accomplish what I asked.
You know how created a spreadsheet with Applications and Display Name. Now you can manipulate the data as you wish.
We have 13 iPad carts in our ES. I was able to brake this down even further to each cart.
I hope this helps!
Thank you all for your assistance!