PowerShell integration and REST API

Hi all,

I have been struggling to implement an automatic script to integrate with the REST API of Sysaid. After a lot of research, I was able to come up with a script that can acheive the following:

- Login to Sysaid and get the "Web Session Token"
- With the web session token, access the REST API as documented by Sysaid

Here it goes:

Function LoginToSysaid: Takes in a username ($username) and a password ($password) and returns a Web Session code
Function GetTicketInformation: Give you the JSON information of a ticket (Whole ticket) with a given $ticketID and $sessionToken
Function UpdateValue: Updates the value of a key ($updateKey) in Sysaid (Could be title, description, notes, see Sysaid Documentation on the REST API) with a new value ($newValue), a ticket ID ($ticketID) and a $sessionToken

You must use the LoginToSysaid first to get the session token, then you can use the other functions to do whatever you want

Let me know if this is useful to you