Application Header Best Practices

Overview

This article serves as a best practices guide for utilizing application headers when interacting with Jamf services or APIs.

User-Agent

Jamf recommends including a User-Agent header with all requests. Values for this header should be of the form:
<product_name>/<product_version> <comment>

<product_name>
Name of the product. iOS and macOS apps utilize the CFBundleName by default, if no other value is specified.
<product_version>
Version of the product. Semantic versioning is recommended, but not required. iOS and macOS apps utilize the CFBundleVersion by default, if no other value is specified.
<comment>
Optional value that may include zero or more details. Typically, sub-product information in decreasing order of importance.

Example

The Jamf Self Service app is provided as an example:

Self%20Service/10.33.0-t1633712823 CFNetwork/1220.1 Darwin/20.3.0

📘

Notice

The User-Agent header uses space delimited values, therefore product names or other values that normally include spaces need to be encoded. Percent encoding is recommended.

In the future, Jamf may provide additional value or benefits to members of the Solution Partner Program who incorporate the use of User-Agent headers into their applications. For more information on acceptable use of the User-Agent header, please see RFC-7231.

Accept

Some services or APIs may return data in more than one format. Jamf recommends including the Accept header in all requests when interacting with such a service or API. When only one format is available, there is no need to include this header, however inclusion within a request will not cause issues or a change in behavior. See the API Reference documentation for each API for additional details.