Upload package to JCDS via API?

jcarr
Release Candidate Programs Tester

Is it possible to upload a package to my cloud distribution point via the JSS API? If so, does the package need to be modified in any way? I've never used the API to POST anything other than xml

Can I use the same syntax and use the path to the .pkg or .dmg file?

Thanks!

d9f0de9085df44aab45d55f720572eed

4 REPLIES 4

peter
New Contributor III
New Contributor III

It is not currently possible to include file contents when creating or updating a Package using the JSS API. You can use it to set the filename and then side-load the package to your JDS, File Distribution Point, or Cloud Distribution Point, but there is currently no way to side-load data to the JCDS.

Uploading full packages through the API would be somewhat problematic since both you and the JSS would have to convert binary data to and from an XML-compatible format.

jcarr
Release Candidate Programs Tester

Thanks Peter! We may be moving from a large centralized JSS, to more streamlined local JSSs in the not-to-distant future, and where the level of technical capability of the site techs is varied, I was hoping for a slick way to provide an AppleScript that could upload a package and build a boilerplate policy in one fell swoop.

I'll keep digging.

ega
Contributor III

We are using Autopkgr with JSSImporter successfully with a JCDS master distribution point.

ftiff
Contributor

When uploading a package to JCDS, I had the following error:

Header value 0 must be of type str or bytes, not <type 'int'>

This is due to kennethreitz/requests that now expect headers in string format.
Change was made with v2.11.1 on August 17th.

I made the following PR to python-jss:
https://github.com/sheagcraig/python-jss/pull/55