Posted on 07-31-2018 07:46 AM
Hi All,
I've been playing with Jamf APIs for a little while and I'm confused where people are getting the body of the request. For example, if i wanted to add a computer to a group, I'd use:
<computer_group><computer_additions><computer><id>###</id></computer></computer_additions></computer_group>
The only reason I know that much is from a blog post. The <computer_additions> is from the Jamf API reference, but it doesn't mention the need for the other tags. Is there a place where the expected XML format of these request bodies is written down?
Posted on 07-31-2018 07:58 AM
If you haven't yet check out Jamf's developer site. It has sample code for working with the API that should point you in the right direction.
Posted on 07-31-2018 04:45 PM
Just to add to this. The developer site is broken into two sections, the top half shows a code snippet and you can run some API calls. Then the second section of the page shows the API calls and what arguments and other tags are necessary for each API call. I am not familiar with working with APIs so this took me a bit to understand. Once it clicked it made more sense.
Posted on 08-01-2018 09:19 AM
@emily Thanks. Theres good stuff in there.
@sdecook Could you explain more of how the bottom part works? For example, looking at computer group it says:
computerGroups{
id integer
name string
}
I don't know what to do with that considering the XML lines above include a <computer_additions> and <computer> tags.