Update Remote Session Credential ​
PUT /api/rscredentials
Updating an existing Remote Session Credential object can be achieved by making a PUT request on the URL, with appropriate fields forming the HTTP message body. You must use the Remote Session Credentials API Key.
The PowerShell example below updates a Remote Session Credential record, linking a different Password record to the Remote Session Credential.
Powershell
#JSON data for the object
$Body = @{
CredentialID = "1011"
PasswordID = "32712"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/api'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/rscredentials' -ContentType "application/json" -Body $jsonData -Header @{ "APIKey" = "<apikey>" }
Write-Output $result