a week ago
Does anyone have any experience with the Jamf Pro API and logging the movement of app licenses?
My organization deals a lot with mobile device apps, and we are trying to find a solution to track the daily movement of licenses when they are checked in or out so we can cost them properly. The daily transactions are high, and we have a lot of apps. It's too much for one person to track so we need a robot.
Saturday
Hello,
Access Jamf Pro API
First, ensure that your organization has access to the Jamf Pro API and the necessary permissions to interact with the system. You may need to authenticate via API credentials to make requests.
2. Identify Relevant API Endpoints
Jamf Pro provides several endpoints for tracking app licenses and installations:
/v1/apps: Use this endpoint to list all apps and their associated license information.
/v1/applications/:id: Provides detailed information about specific applications, including license counts and statuses.
/v1/mobiledeviceapplications: Use this endpoint to track installed apps on mobile devices, which can help determine when apps are checked in or out.
3. Track License Movement
To track daily movements of app licenses, you'll want to monitor installations and removals. Each time an app is installed or removed from a device, Jamf Pro logs this action. You can set up a system that queries these logs via the API:
Installation/Checkout: When a device checks out an app (installation), you can log this as a "checkout" event.
Return/Check-in: When the app is uninstalled or returned, you can log this as a "check-in" event.
You can use the /v1/mobiledeviceapplications endpoint to periodically fetch this data and determine the movement of licenses.
4. Automation with a Robot (Script/Tool)
You can automate the tracking process using a script or tool. Here's how:
Cron Jobs or Scheduled Tasks: Set up a cron job or scheduled task to run a script that queries the Jamf Pro API at regular intervals (e.g., daily) to check for app installation/removal events.
Data Storage: Store the collected data (e.g., in a database or CSV file) to track the historical movement of app licenses.
Reporting: Create reports or dashboards to visualize the data, making it easier to cost the licenses properly.
Best Regards