API - Manipulation of script attributes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
06-28-2018
05:19 PM
- last edited on
03-04-2025
02:59 AM
by
kh-richa_mig
Is it possible (or has anyone done this before) to manipulate the names of scripts....
I want to essentially rename a group of scripts, but not the actual contents of the script...
(i.e rename script from "original.sh" to "renamed.sh"....
I've had no problem getting scripts, but having problems with the 'put' command, and unsure if it's very limited in what you can do.
Thanks for any advice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-29-2018 07:40 AM
Hi!
I just tested it and got it to work. I used something like this:
curl -u $user:$pass -H "Content-type: text/xml" -d "<script><name>newnameofthescript</name></script>" $jamfUrl/JSSResource/scripts/id/$id -X PUT
Is it possible to post your script to check where it goes wrong?
Greetings,
Marco

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-29-2018 10:18 AM
what's strange is that i'm using postman, i did it yesterday wasn't working....
did it now, it works?
I don't think i changed anything.
Thanks for the sanity check @mkolb , at least i know i can do it now.
Some days...
Have a good weekend.
ks
