Skip to main content
Question

API - Manipulation of script attributes

  • June 29, 2018
  • 2 replies
  • 16 views

Forum|alt.badge.img+9

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

mkolb
Forum|alt.badge.img+8
  • Contributor
  • June 29, 2018

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


Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • June 29, 2018

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