Hi all, I'm trying to get my portal to be available to me from within PowerShell. I've gotten so far as to get an authentication token from the system, but am stumbling on how to actually get it to allow me to pass it through.
Following the API documentation, I'm passing my token value in through the headers, but I continue to either get an unauthorized message, or an invalid header structure.
Here is how I'm gathering my token, but past this, I'm just stumbling on getting data out.
$Headers = @{}
$Headers.Add("Username","ITMoney")
$Headers.Add("Password",'ILoveCake')
$Headers.Add("LanguageCode","ENU")
$Headers = $Headers | ConvertTo-Json
$URI = "$URL/api/V3/Authorization/GetToken"
Invoke-RestMethod -Uri $URI -Body $Headers -Method Post
(Apologies if this is simple - but all the more reason to help, right?!)
Answers
If required, then I believe this example is what you're looking for from Cireson KA#1199
The following is an example of how to create a new announcement using the Cireson Portal API and PowerShell.
Just modify the script to use your own environment URL and credentials.