Utilizing JAMF API

Jae
New Contributor III

Hey all,

Our developers are looking to integrate their app store project with Casper using the API.

The goal is to have a web based App Store that can trigger software to be installed on a user’s machine through Casper.

Has anyone done this and can give some pointing in the right direction?

This is not my realm :), so It's something I would pass on to the developers.

Thanks

8 REPLIES 8

davidacland
Honored Contributor II
Honored Contributor II

Hi,

It sounds possible, depending on the workflow steps. You can get a list of the APIs and test with https://your.jss.com:8443/api and there is more resources available here http://www.jamfsoftware.com/developer-resources/

roiegat
Contributor III

I would have them go to:
http://www.jamfsoftware.com/developer-resources/

There is an SDK they can download which includes some great documentation.

We use it for replicating our distribution points. Works great.

freddie_cox
Contributor III

Sounds like it is replicating what Self Service already provides since it is just a web page that triggers software installs. :)

However, it could be as simple as scoping a policy to a static or smart group and using an API call to add the user/computer to the scoped group.

As @davidacland mentioned, I would send them to the built-in API documentation and figure out a workflow that works for your specific situation.

ChrisL
New Contributor III

If your developers are using ruby, the jss-api ruby gem t can greatly simplify the process.

The slides from my presentation of it last year are here, and the video of the talk is here

Cheers!

jmb03012
New Contributor III

We actually just had an almost identical project to this come up except we are looking to integrate the functionality into one of our Bloomberg Terminal functions.

@lawrencj1 , could you share any updates regarding your team's progress? Any information would really be appreciated so that I can pass it on to our internal systems R&D team.

@freddie.cox , yes, I said the same thing about replicating the functionality when asked but we tie the function into other systems like SAP so having it all flow through one place its really beneficial. My idea was basically the same as what you mentioned, we would use MySQL queries for mass scrapes of the database off-hours to populate all our computer info, and then have pre-staged static groups for each of our software titles we are looking to have editable by the Bloomberg Terminal function and them just have it make PUT and DELETE requests to the API to add and remove computers from the groups as needed. I have a lot of experience with the API but mostly just for reading information into our different systems or creating entirely new items, but never actually modifying existing ones. From what I'm reading, it seems as though you can't actually just add a computer to the group via the API, but actually have to download the XML for said group, modify the membership, and re-upload it. Is that accurate or am I mis-reading what I've found in my research?

Thanks!

mm2270
Legendary Contributor III
From what I'm reading, it seems as though you can't actually just add a computer to the group via the API, but actually have to download the XML for said group, modify the membership, and re-upload it. Is that accurate or am I mis-reading what I've found in my research?

So far as I know, this is still accurate. I have not found a way to do a simple PUT command to update a computer group to add a new computer into it other than pulling down the full group xml and adding the new Mac to the end and closing off the xml file so its properly formatted and then using PUT with that to upload it again. Its a pain quite frankly and I'm puzzled why it works this way. Its not really a PUT function if you have to practically (re)create the whole group xml. More of a POST if you ask me, so its misleading at best.

Jae
New Contributor III

@jmb03012 Here is the basic workflow. What our dev team did was use static groups which are scoped to different policies/ installations.

When a request is sent through the app store web link, it adds the user's machine into that static group and the policies/ installs scoped to that group are installed/ ran during the next check in. If you need anything specific from the dev guys on this I can see if they can help.

Some challenges we are looking into:

  1. Policies/ installs that depend on the version of the OS (Office 2016 Standalone for example which only works on Yosemite). I wish we could set a group within a group some way. At this point we will just need to make multiple static groups. We are also looking for a way for the app store to identify the OS version.

  2. Testing if the policy should be set to once per computer or user.

  3. Multiple installs upon check in (we have seen success with this. If we have a user who requests several installs and they all begin on check in.).

jmb03012
New Contributor III

@mm2270 Thanks for confirming and I agree, PUT is asking more like POST, so basically we would do a GET to bring down the XML, modify it, and a PUT to "update" (or really re-write it totally like a POST)?

@lawrencj1 Thanks for all this information, super helpful to see that it looks like we have the right idea. Appreciate the callout on the challenges as well.

My follow-up question would be once the machine is added to the static group and the policy executes, how are you guys ensuring that that machine gets removed from the group automatically as well to ensure that should that software need to be pushed to that machine again down the road (say if the machine is re-imaged and re-assinged to a new user who initially doesn't need that previously installed software but now does) that it can actually be pushed? Normally via the JSS you could do a log flush on that policy if you had it sent to once per computer or alternatively you could be using a smart group with criteria (but it seems for what you and we are doing static groups are preferred).