GithubHelp home page GithubHelp logo

nstrauss / jamf-cat-report Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 14 KB

Get data about the state of your Jamf Pro mobile device app catalog in a nicely formatted CSV.

License: MIT License

Python 100.00%
jamf jamfpro

jamf-cat-report's Introduction

jamf_cat_report.py

Python tool to output Jamf Pro mobile device app catalog info. Written mostly to get. Default behavior (or -all) is to loop through all available mobile device apps in a Jamf Pro server and write data to CSV.

The new default behavior in version 0.4 is to not get installed app count - the number of iOS devices on which an app is installed. A change in the Jamf Pro API makes creating, getting data from, and deleting advanced searches very slow. Very, very slow. As this was the method used to get installed app count, it's not longer set by default. If you would still like the count use --enable-count, but consider it could take hours with large app catalogs, and with enough failed retries will still return no data. I do not recommend using it at this point. Don't be surprised by the high number of errors.

 /\_/\
( o.o )
 > ^ <

Reported fields:

  • id - Jamf Pro mobile device app ID.
  • name - App name.
  • main_category - Main app category.
  • self_service_cat1-5 - Five Self Service categories. Ends up being first five API returns.
  • featured - If the app is included under the featured category in Self Service.
  • installed_count - Number of iOS devices on which an app is installed.
  • used_licenses - Used license count.
  • remaining_licenses - Remaining license count.
  • total_licenses - Total available licenses.
  • free - True or False depending on current price listed in the App Store. Not a reflection of whether "Free" box is checked in Jamf Pro.
  • price - Current price from App Store. Default is to return USD from US App Store.
  • latest_release - Date of latest version release.
  • average_rating - Total average rating. Not rating of current version.
  • bundle_id - App bundle ID.
  • jamf_url - Jamf Pro mobile device app link based on provided URL in config.json.
  • jamf_itunes_url - App Store URL pulled from Jamf Pro.
  • apple_itunes_url - App Store URL pulled from iTunes API.

Note: Only apps where device based VPP is enabled are included. Want more fields? Submit a PR! :)

Required Jamf Pro privileges:

  • Create, read, update, and delete for Advanced Mobile Device Searches
  • Read for Mobile Device Apps

Requires requests for API calls. Use pip install --user requests to install if you need it.

Change values in config.json as needed before running. iTunes API country code can be changed following ISO 3166-1 format (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

To get app counts an advanced search is created per app, devices counted, and then search object deleted. This can increase advanced search count by a lot, but shouldn't impact the database since the advanced search object is temporary. Tested with python3 on macOS High Sierra-Big Sur.

--all                   Default behavior. Loop through all Jamf Pro mobile
                        device apps and output data to CSV in working
                        directory.

--app-id jamf_pro_app_id [jamf_pro_app_id ...]
                        Pass in a mobile device app ID. Multiple IDs can be
                        included separated by space. e.g. --app-id 101 110 605

--file-path path_to_file
                        Path to file with list of new line separated app IDs.

--enable-count          Enable count of number of iOS devices on which an app is installed.
                        Slows down reporting significantly.

--retry                 Number of retry attempts to get advanced search data
                        after object is created. Usually used when Jamf Cloud
                        is slow to create search objects.

--version               Print version and exit.

Future plans:

  • Add multithreading to return large catalogs more quickly.
  • Include scope data.
  • Allow app lookup by name.
  • Output app data to session instead of CSV.

jamf-cat-report's People

Contributors

nstrauss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jamf-cat-report's Issues

itunes store change to apple

I used this today (12/05/19) I had just downloaded a new app via VPP this morning and noticed the script was erroring. I ran " print(itunes_url) " above line 146 and noticed the app I downloaded this morning had a different URL the iTunes no longer exists. I'm assuming this has something to do with the upcoming iTunes store removal/migration.
I hope this helps someone else

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.