Archive
A beginner’s guide to the Jamf Pro Classic API
When working with Jamf Pro, one way to save yourself a lot of clicking in the admin console is to use one of the two current Jamf Pro APIs. Both APIs are REST APIs, which means they can perform requests and receive responses via HTTP protocols like GET, PUT, POST and DELETE. That means that the curl tool can be used to send commands to and receive information from a Jamf Pro server.
The two APIs are as follows:
- Classic API
- Jamf Pro API (formerly known as the Universal API)
Classic API
This API is the original one which Jamf Pro started with and it is slated for eventual retirement. This API is designed to work with XML and JSON.
The base URL for the Classic API is located at /JSSResource on your Jamf Pro server. If your Jamf Pro server is https://server.name.here:8443, that means that the API base URL is as follows:
https://server.name.here:8443/JSSResource
To help you become familiar with the API, Jamf includes documentation and “Try it out” functionality at the following URL on your Jamf Pro server:
https://server.name.here:8443/api
The Classic API is designed to work with usernames and passwords for authentication, with the username and password being passed as part of the curl command.
Examples: https://developer.jamf.com/apis/classic-api/index
Jamf Pro API
This API is in beta and is designed to be an eventual replacement for the Classic API. This API is designed to work with JSON.
The base URL for the Jamf Pro API is located at /uapi on your Jamf Pro server. If your Jamf Pro server is https://server.name.here:8443, that means that the API base URL is as follows:
https://server.name.here:8443/uapi
To help you become familiar with the API, Jamf includes documentation and “Try it out” functionality at the following URL on your Jamf Pro server:
https://server.name.here:8443/uapi/docs
The Jamf Pro API is designed to work with token-based authentication, with a Jamf Pro username and password used to initially generate the necessary token. These tokens are time-limited and expire after 30 minutes. However, you can generate a new token for API authentication using the existing token’s credentials. The new token generation process does the following:
- Creates a new token with the same access rights as the existing token.
- Invalidates the existing token.
Jamf Pro API examples: https://developer.jamf.com/apis/jamf-pro-api/index
For more details, please see below the jump.
Recent Comments