API - Manipulation of script attributes

kstrick
Contributor III

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

2 REPLIES 2

mkolb
Contributor

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

kstrick
Contributor III

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