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

omrifakrash
New Contributor

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 4

AJPinto
Honored Contributor III

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.

omrifakrash
New Contributor

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
Honored Contributor III

 

  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.

omrifakrash
New Contributor

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