Oct 21, 2014

#jnuc #jamf - 10/21 - Session 2: JSS REST API

Discussing API usage/features

Why I chose this:
This is marked as advanced session, which seems a bit counterproductive, given my first session was a "101" variety. But, the other sessions offered at this time did not appeal to me, and I wanted to see what an "Advanced" session was like. So, why not, right?

What I learned:

What it means to be RESTful

Replace in all polices with...

RADAR and Printer Chooser. Client API usage.

Representational State Transfer (REST) Methods
- Standard web calls with different methods being used.
-- Get method (get information)
-- Put method (replacing collections, update specific element)
-- Post method creates a new member element (forms in web)
-- Delete method - cannot delete entire collection, used to delete specific element

Usage: yourjssurl:port/api/

(Presenter showed examples of the methods in order to pull the "get" url and the xml response body.)

These are used in your scripts as ways to get/put/update/delete information from within your jamf scripting.

Replace in all policies with...
-- define variables
-- gather list of policies
-- loop through all policies, searching for policies which deploy a specific pkg
-- replace found entries with the updated package
-- update policy record by uploading updated xml

Define jssserver; username/password for service account; old/new package id; newaction
Gather a list of policies
Loop through all policies
Find package and replace
Update policy record

XML must be used for updating. JSON can be used to read data only.

- Robust multi-Area Distribution Active Routing
-- Pings Distribution points in parallel then downloads from the "closest" DistPoint

Printer Chooser
- Grabs all printers defined in JSS
- Can use drop-down to find the printer. Can browse to find the printer and install.
- Specify driver to look for
- Cache all drivers on client machine
- Checks to see if driver is installed. If not, install the driver then install the printer.

Revision Control in JSS
Pull down anything from jss via XML
Commit > git hook > update jss script(s)

Covered package-related questions such as clearing logs, not replacing unaffected packages from within a given policy. Question about the API and smart groups -  display glitched but not affect actual devices. Other Q&A as well.

No comments:

Post a Comment