Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

Add support for JSS Universal API #5

@alulsh

Description

@alulsh

Right now this module is only a wrapper for the JSS REST API. We should update the current docs for the module to make this more clear.

Based on Jamf's blog posts, it looks like they are encouraging people to transition to the Universal API as they continue to build it out (the Universal API does not yet contain all of the same methods as the JSS REST API):

Finally, Tani Kawleit closed the session by showing off Jamf’s new Universal API. They have written the new Universal API to be modern and RESTful and expands on the existing customer API. It features token-based authentication and uses versioning while supporting pagination and sorting. Tani explained that the universal API uses only JSON for all operations and does not support XML and the payloads are lighter and contain the entire schema for easy reading.

We could potentially add support for the Universal API (https://yourdomain.jamfcloud.com/uapi/doc/) as well using the config object:

var config = {
  api: 'universal',
  token: process.env.JAMF_API_TOKEN,
  jamfUrl: process.env.JAMF_URL
}

We'd then change the base URL for this wrapper to be either this.config.jamfUrl + '/JSSResource' + path (JSS REST API) or this.config.jamfUrl + '/uapi' + path (Universal API) depending on which URL. This might introduce a breaking change as users would need to specify api: 'rest' for the JSS REST API (at the moment you don't need to do so in the config).

Also, I'm not sure if the tokens used in the JSS Universal API are long lasting (can be added to your local environment) or if they expire quickly and must be dynamically generated before making any Universal API calls. This needs to be tested and evaluated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions