Skip to main content
Question

Jamf API format

  • July 31, 2018
  • 3 replies
  • 21 views

Forum|alt.badge.img+3
  • New Contributor

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

emily
Forum|alt.badge.img+26
  • Hall of Fame
  • July 31, 2018

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


Forum|alt.badge.img+13
  • Contributor
  • July 31, 2018

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • August 1, 2018

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