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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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.


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

PHP Build Version
Package Version
Requires php Version ^8.5
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fredbradley/jamf-api contains the following files

Loading the files please wait ...