Skip to main content
Question

Is it possible to delete or add scripts to a policy through API call?


Forum|alt.badge.img+3

I see update or create policy documentation on Classic API. This API is getting a policy object in xml format, without its scripts property (unlike the response from GET on this api that returns xml of policy including its scripts).

There is a way to link or unlink a script to a policy instance through API call? 

Thanks in advance

4 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2742 replies
  • July 17, 2024

I think you can only create new policy with PUT, EDIT looks to be limited to adjusting the scope of a policy. I am anything but an API expert, but I don't think you can do what you are wanting with API unless you just deleted the script.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 3 replies
  • July 22, 2024

Thanks @AJPinto.
I have another problem with updating | creating a configuration profile with its payloads.
I can see a pattern that all types from the classic API (and not pro API) are supporting only 3 entities: general, scope and self_service. Is this observation correct? Is there any other API I can use to adjust other properties? Is there a plan the extend pro API to more types?

 

Appreciate any comment :)


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2742 replies
  • July 22, 2024
omrifakrash wrote:

Thanks @AJPinto.
I have another problem with updating | creating a configuration profile with its payloads.
I can see a pattern that all types from the classic API (and not pro API) are supporting only 3 entities: general, scope and self_service. Is this observation correct? Is there any other API I can use to adjust other properties? Is there a plan the extend pro API to more types?

 

Appreciate any comment :)


 

  1. I have another problem with updating | creating a configuration profile with its payloads: Are you trying to create a Configuration Profile with API?
  2. I can see a pattern that all types from the classic API (and not pro API) are supporting only 3 entities: general, scope and self_service: These are the 3 tabs in a configuration profile in Jamfs GUI
  3. Is there any other API I can use to adjust other properties: Are you trying to Adjust Jamfs GUI elements?
  4. Is there a plan the extend pro API to more types? I can't speak for Jamf, but I have not seen any significant changes in API ability in the 6 years I have worked with Jamf.

 

Parting thoughts: Jamfs API is very robust, but is designed for system integration, reporting, with the occasional simplifying of repeated processes.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 3 replies
  • July 22, 2024

1. Yes create and also update an existing one

2. You are right, my misunderstanding 

3. Exactly

4. Thanks

 

Updating that I manage to update scripts on a policy through API call. Will summarize here how to do it later


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings