Using Syncro Cmdlets to upload file to ticket

There’s not a whole lot of documentation on the powershell Syncro Cmdlets…
I’m running a script that outputs a file to a specific directory and I would like the script to upload the file to a ticket that I have create with running the script… I’m not sure if there is a cmdlet to do that, but curious if anyone else has tried.

Thanks in advance!

You can upload a file to an asset record, but not a ticket record.

Bummer… I was hoping to use a script that outputs an HTML file with results of testing. I thought maybe I could have that HTML file uploaded to a ticket. Is there any scripting method that a file could be attached like using the email cmdlet or something else? Or is it only the assets record?

Can the file be that’s uploaded via cmdlet to an asset record file be overwritten or would it just keep adding files to the asset?

Thanks!

For the Powershell commands that we include with scripts natively it’s only for assets. You can do it via the API though if you wanted to. Check out the /tickets/{id}/attach_file_url endpoint. You can view all of the available API calls in the Admin Settings of your Syncro instance. Scroll all the way to the bottom of that page and on the left look for API > Documentation.