Jamf API format

MSR
New Contributor II

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?

3 REPLIES 3

emily
Valued Contributor III
Valued Contributor III

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.

http://developer.jamf.com/sample-code

sdecook
Contributor

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.

MSR
New Contributor II

@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.