Download the PHP package fredbradley/jamf-api without Composer
On this page you can find all versions of the php package fredbradley/jamf-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package jamf-api
fredbradley/jamf-api
A fully typed, fluent PHP 8.5+ wrapper for the Jamf Pro REST API, built for Laravel 12/13 using the HTTP Facade.
- Covers all major Jamf Pro API resource groups (computers, mobile devices, scripts, packages, policies, patch management, enrollment, VPP, and more)
- Two authentication methods: bearer token (username/password) or OAuth 2.0 client credentials — with automatic token caching and refresh
- Strongly typed responses — every endpoint returns a PHP 8.5
readonlyDTO or a typedPage<T>paginator - Typed exceptions mapped to HTTP status codes —
NotFoundException,ForbiddenException, etc. - Full IDE autocompletion via PHPDoc on every method and the
Jamffacade
Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.5 |
| Laravel | 12 or 13 |
Installation
The service provider and facade are registered automatically via Laravel package discovery.
Publish the config file:
Configuration
Add the following to your .env file:
Authentication methods
Token authentication (JAMF_AUTH=token)
Exchanges a Jamf Pro username and password for a bearer token via POST /api/v1/auth/token. The token is cached and automatically renewed using the keep-alive endpoint before it expires. Best for user accounts with defined API privileges.
OAuth 2.0 client credentials (JAMF_AUTH=oauth)
Uses a Jamf Pro API integration's client_id and client_secret to obtain an access token via POST /api/oauth/token. This is the recommended approach for machine-to-machine integrations. Create an API integration in Jamf Pro under Settings → API roles and clients, assign it an API role, and copy the generated credentials.
Usage
Via the Facade
Via dependency injection
Pagination
Endpoints that return lists use the Page<T> wrapper:
Iterate through all pages:
Filtering and Sorting
List endpoints support RSQL-style filter strings and sort fields:
Use the SortOrder enum to build sort strings safely:
Computer Inventory
Mobile Devices
Scripts
Packages
Prestages (Automated Device Enrollment)
Device Enrollments (DEP/ADE)
Webhooks
API Roles & Integrations
Patch Management
Inventory Preload
Local Admin Password (LAPS)
MDM Commands
Volume Purchasing (VPP)
History
Any resource that supports history exposes a history() or historyFor() method:
Error Handling
All API errors are thrown as typed exceptions that extend JamfException:
| HTTP Status | Exception |
|---|---|
| 401 | AuthenticationException |
| 403 | ForbiddenException |
| 404 | NotFoundException |
| 422 | UnprocessableEntityException |
| 429 | RateLimitException |
| 5xx | ServerException |
Available Resources
| Facade method | Description |
|---|---|
auth() |
Token management (obtain, keep-alive, invalidate) |
accounts() |
User accounts (CRUD) |
accountGroups() |
Account groups (read) |
apiRoles() |
API roles (CRUD) |
apiRolePrivileges() |
Available API privilege strings |
apiIntegrations() |
OAuth API integrations (CRUD + credential generation) |
ldap() |
LDAP server listing and group search |
cloudLdap() |
Cloud Identity Provider (LDAP) configuration |
ssoSettings() |
SAML SSO settings and certificate management |
computerInventory() |
v2 computer inventory (list, find, detail, patch, delete) |
computerPrestages() |
Mac automated enrollment profiles (CRUD + scope) |
computerGroups() |
Smart and static computer groups |
computerManagement() |
Applied policies/profiles summary for a computer |
mobileDevices() |
Mobile device inventory (list, find, detail, patch) |
mobileDevicePrestages() |
iOS/iPadOS/tvOS enrollment profiles (CRUD + scope + syncs) |
mobileDeviceGroups() |
Smart and static mobile device groups |
mobileDeviceApps() |
Managed apps (CRUD) |
mobileDeviceManagementCommands() |
Send MDM commands to mobile devices |
advancedMobileDeviceSearches() |
Saved advanced search criteria (CRUD) |
enrollment() |
Global enrollment settings (get, save, language messaging) |
enrollmentCustomization() |
Setup Assistant branding (CRUD) |
deviceEnrollments() |
Apple DEP/ADE instances (CRUD + sync + devices) |
userEnrollments() |
User-initiated enrollment sessions |
apnsClientPushStatus() |
Devices with disabled APNS push |
scripts() |
Shell/Python scripts (CRUD + history) |
packages() |
Installer packages (CRUD + history) |
categories() |
Categories (CRUD + history) |
departments() |
Departments (CRUD + history + CSV export) |
buildings() |
Buildings (CRUD + history + CSV export) |
sites() |
Sites (list) |
icons() |
Icon upload and download |
webhooks() |
HTTP event webhooks (CRUD + history) |
patchManagement() |
Patch management settings + disclaimer |
patchTitles() |
Patchable software title catalogue (list + patches) |
patchSoftwareTitleConfigurations() |
Patch policies (CRUD + dashboard + export + history) |
inventoryPreload() |
Pre-enrollment device data (CRUD + CSV import/export) |
inventoryInformation() |
Device count summary |
extensionAttributes() |
Custom inventory fields (computer + mobile device) |
activationCode() |
Activation code and organisation name |
checkIn() |
Computer check-in frequency settings |
selfService() |
Self Service app settings |
selfServiceBranding() |
Self Service iOS/macOS branding (CRUD + image upload) |
onboarding() |
Onboarding flow configuration |
cacheSettings() |
Cache settings |
dashboard() |
Dashboard summary data |
jamfProInformation() |
Server version and build info |
startupStatus() |
Server startup progress (no auth required) |
supervisionIdentities() |
Apple Configurator supervision certificates (CRUD + download) |
localAdminPassword() |
LAPS — view and rotate local admin passwords |
volumePurchasingLocations() |
VPP content token connections (CRUD + revoke) |
volumePurchasingSubscriptions() |
VPP event subscriptions (CRUD) |
mdm() |
MDM command sending + management framework redeploy |
managedSoftwareUpdates() |
OS/software update plans (CRUD) |
remoteAdministration() |
Team Viewer remote support sessions |
jamfConnect() |
Jamf Connect settings and deployments |
teacherApp() |
Teacher app settings |
advancedUserContentSearches() |
Advanced user content searches (CRUD) |
Testing
The package uses the Laravel HTTP Facade, so responses can be faked in tests using Http::fake():
Run the package's own tests:
License
MIT
All versions of jamf-api with dependencies
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/cache Version ^12.0|^13.0