Posted on 03-07-2019 09:54 AM
Sorry if this is a simple one but couldn't find an answer elsewhere
After I upload a package to Jamf, is there a way to download it? Giving I don't have the original package and it's not in Composer.
I need this to be able to push the package through Munki and/ or Deploy studio
Thanks!
Solved! Go to Solution.
Posted on 03-07-2019 10:02 AM
@Buraq If your distribution point is on-site, you can get the package from there via smb. Alternatively you can create a policy to cache the package on a Mac (or use Jamf Remote), then go get it afterward.
The package would be here I believe:
/Library/Application Support/JAMF/Waiting Room
Posted on 03-07-2019 10:02 AM
@Buraq If your distribution point is on-site, you can get the package from there via smb. Alternatively you can create a policy to cache the package on a Mac (or use Jamf Remote), then go get it afterward.
The package would be here I believe:
/Library/Application Support/JAMF/Waiting Room
Posted on 03-07-2019 10:16 AM
@ryan.ball Amazing thanks. The caching policy worked. The waiting room folder was locked though and I had to chmod it.
Thanks again!
Posted on 03-07-2019 10:23 AM
@Buraq Just do the following and navigate into via root
sudo su -
# Enter password at prompt
cd /Library/Application Support/JAMF/Waiting Room/
Posted on 02-09-2022 12:07 PM
Replicate DP from JAMF admin to local drive?
Posted on 11-04-2022 12:59 PM
Using the following syntax:
curl -k -v -u user:password https:/jss.host.com:8443/JSSResource/packages -T xmlFile.xml -X POST <--from here: https://community.jamf.com/t5/jamf-pro/can-we-add-packages-to-the-jss-thru-the-api/m-p/51171
I was able to auth to my cloud instance, putting a file there. Utilizing a web browser, I navigated to the URL, which just showed me a wall of text, but the text was all my package names!
Going back to terminal, and using the following syntax:
curl -L -o [Numeric Value assigned by JSS]Package_Name.pkg --user apiuser:password https:/your.jss.instance:443/JSSResource/packages/22test_package.pkg -X POST
It downloaded without issue!
Posted on 02-15-2024 12:04 PM
I tried that, and I got a file named 27mypackage.pkg, but it was only a few hundred bytes, and clearly wasn't the whole package.
Posted on 03-19-2024 12:52 PM
Thanks for posting this! Following is a modified version utilizing API auth via bearer token:
#!/bin/zsh
apiUsername=your_api_user
apiPassword=your_api_password
jssServer=https://your.jss.com:443 (or 8443 if onprem)
# request auth token
authToken=$( /usr/bin/curl \
--request POST \
--silent \
--url "$jssServer/api/v1/auth/token" \
--user "$apiUsername:$apiPassword" )
echo "$authToken"
# parse auth token
token=$( /usr/bin/plutil \
-extract token raw - <<< "$authToken" )
tokenExpiration=$( /usr/bin/plutil \
-extract expires raw - <<< "$authToken" )
localTokenExpirationEpoch=$( TZ=GMT /bin/date -j \
-f "%Y-%m-%dT%T" "$tokenExpiration" \
+"%s" 2> /dev/null )
echo Token: "$token"
echo Expiration: "$tokenExpiration"
echo Expiration epoch: "$localTokenExpirationEpoch"
curl -L -o digitPackageName.pkg -H "Authorization: Bearer $token" 'https://your.jss.com:443/JSSResource/packages/digitPackageName.pkg' -X POST
Found that I didn't have to upload a dummy package, and could auth via my admin crews to the package folder on my JSS
Posted on 03-19-2024 12:53 PM
Replied to myself! Hilarious! Too much going on.
Posted on 03-19-2024 01:10 PM
Thanks for posting this. I keep a copy of all the packages I upload, but in my current job I inherited Jamf administration from someone less fastidious. The last time I needed a package, I used the "install cached" method and found the package in the waiting room.
Next time, I'll use your script.