Skip to content

fix: Set correct Content-Type for all PATCH requests #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

neilmartin83
Copy link
Contributor

@neilmartin83 neilmartin83 commented May 7, 2025

Specified in dev documentation: https://developer.jamf.com/developer-guide/docs/api-style-guide#methods - it should be set for all PATCH requests.

Specifically found that PATCH requests to /v1/volume-purchasing-locations fail if not set to application/merge-patch+json.

Tested PATCH requests to a few other endpoints and they work with either application/merge-patch+json or application/json.

However the developer documentation stipulates this is required:

Standard PATCH (JSON Merge Patch) MUST be used for public Jamf API endpoints.

Specified in dev documentation: https://developer.jamf.com/developer-guide/docs/api-style-guide#methods - it should be set for all PATCH requests.

Discovered that PATCH requests to /api/v2/patch-software-title-configurations require `application/merge-patch+json` or they will fail. Other endpoints work with that or `application/json`.
@thejoeker12 thejoeker12 merged commit f8acca0 into deploymenttheory:main Jun 6, 2025
@neilmartin83 neilmartin83 deleted the nm-jamf-patch-headers-2025-05-07 branch June 6, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants