
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
NOTE: This package was moved from github.com/mapbox/node-jamf, which has since been archived. The jamf
NPM module will be maintained by @trevorspecht, and will no longer have any connection to Mapbox.
A lightweight Node.js wrapper for Jamf Pro's JSS REST API.
Currently this module only supports GET
requests for the JSS REST API. Support for other methods such as PUT
, POST
, and DELETE
will be added later.
Support for the JSS Universal API may also be added later.
npm install jamf
The following code sets up the module and configures the API client with values from your local environment:
var JamfApiClient = require('jamf');
var config = {
user: process.env.JAMF_API_USER,
password: process.env.JAMF_API_PASSWORD,
jamfUrl: process.env.JAMF_URL,
format: 'json'
}
var jamf = new JamfApiClient(config);
jamf.get('/accounts', function (err, res){
if (err) console.log(err)
console.log(res)
});
Each Jamf API client method requires a path (e.g. /accounts
) and a callback (function(err, res)
) function.
For example, if you wanted to get the General and Location subsets of information about a computer with an id of 50:
jamf.get('/computers/id/50/subset/General&Location', function (err, res){
if (err) console.log(err)
console.log(res)
});
You can find more examples in the examples
directory of this project.
You need to configure the Jamf API client before it can make any API calls. You'll need the following for configuration:
user
: username for the JSS user accessing the Jamf APIpassword
: password for the above accountjamfUrl
: the URL of your JSS instance, whether on premise or in the cloud (https://yourdomain.jamfcloud.com
)format
: the format of the returned data, must be either xml
(Jamf API default) or json
We recommend you create a new dedicated, least privilege API user for these scripts. The user must have the necessary privileges (create, read, update, or delete) on the JSS objects
Here's an example configuration for obtaining XML data:
var config = {
user: 'readonlyapiuser',
password: 'fakepassword',
jamfUrl: 'https://fakefakefakefake.jamfcloud.com',
format: 'xml'
}
var jamf = new JamfApiClient(config);
To run the tests for this project:
npm test
The tests use eslint for linting and tape for tests.
Are we missing something in this module? Did you find a bug?
Please look through the list of issues (both open and closed) and see if an issue already exists for what you want to propose or report.
Don't see anything in the issues? Please create a new one!
Contributors are welcome! If you want to contribute, please fork this repo then submit a pull request (PR).
All of your tests should pass before we'll accept your PR. We also request that you add additional test coverage and documentation updates in your PR where applicable.
/api
on your JSS instance. For example, visit https://yourdomain.jamfcloud.com/api
[1.0.2] - 2020-07-22
FAQs
A Node.js wrapper for the Jamf Pro JSS REST API
The npm package jamf receives a total of 85 weekly downloads. As such, jamf popularity was classified as not popular.
We found that jamf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.