Save a script to the script library
Add a script to your company’s script library and return it with its scriptId. Nothing runs on a device: run it afterwards with runScript or runDeviceScript, whose runs then carry the script’s name and scriptId in getScriptRuns.
The name must be unique in the library and end with the extension that decides the interpreter and the platforms: .sh (macOS + Linux), .py (macOS + Linux), .ps1 (Windows). The name cannot be changed later. The source is limited to 90 KB. Refused with 409 when the name is taken.
To change the source of a saved script, use updateScript; to remove it, deleteScript. To add the scripts Primo maintains for a known issue, use addRemediationKit.
Authorizations
Body
Response
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$