mapbox / node-jamf

A Node.js wrapper for the Jamf Pro JSS REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for POST, PUT, and DELETE methods

alulsh opened this issue · comments

Currently this wrapper only supports GET requests for the JSS REST API. We should add support for other HTTP methods such as POST, PUT, and DELETE.

For example, we can add a post function to the JamfApiClient object prototype and update the method for the request from GET to POST.

For these HTTP methods in particular we should add solid test fixtures for Nock as well to avoid having to test on a production API.

We should also add code samples and update the README with useful documentation for these other methods.

/cc @mapbox/security @ianshward

Would there be any benefit to adding all of the JAMF resources as callable methods - in line with what this Python library does:

https://github.com/eventbrite/Casper-API-Tools Scrap this comment - it looks like you refactored to move away from this style of API wrapper - #2.

At the moment I've added PUT and POST (will PR soonish - need to figure out how to add test fixtures first). I submitted the PR. Would appreciate some guidance on what test fixtures would be useful.

_@alush A bit confused. Is there support now for PUT and POST request. I usually _use bash for my api calls but now need to do a request with javascript. Thanks.

Hi @ururk and @Elwyn1979. @alulsh is no longer maintaining this repo, and Mapbox plans to archive the repo since it is not in use. Since it is public, however, and has been published as an NPM module, I plan to keep it active outside of Mapbox in my own Github account. I have not found another Node.js SDK for the Jamf API, so I think there is public benefit to keeping this active and maintained.

@ururk thanks for the PR, I will take a look and aim to get it merged and deployed to NPM before too long.

any future updates or maintenance will be done at this library's new home: https://github.com/trevorspecht/jamf-sdk-node