Skip to main content
Question

JamfPro API creating a new policy

  • February 10, 2022
  • 1 reply
  • 18 views

Forum|alt.badge.img+3

Hello,

I have a question regarding the policy creation endpoint. It specifies that you need to supply the ID of the new policy, however if I supply it 0, it'll just automatically find out what the previous max ID was and increment it by one. Which is fine, but my question is: Why do I have to put in an ID number for this when I can simply supply it with 0? Isn't it simpler to just have a policies endpoint that you can post to?

 

 

1 reply

ega
Forum|alt.badge.img+17
  • Valued Contributor
  • February 10, 2022

I my experience Jamf has wanted -1 to create a new object like a policy.  You might want to look at the Jamf-upload repo https://github.com/grahampugh/jamf-upload for examples.