Update Remote Site Location ​
PUT /userapi/remotesitelocations
Updating an existing Remote Site Locations entry can be achieved by making a PUT request on the URL, with appropriate fields forming the HTTP message body. The account executing this call must have the 'Remote Site Locations' Security Administrator's role in Passwordstate.
Powershell
#JSON data for the object
$Body = @{
SiteID = "1"
SiteLocation = "Contoso New York"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/userapi'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/remotesitelocations -ContentType "application/json" -Body $jsonData -Header @{ "UserID" = "<UserID>" ; "APIKey" = "<APIKey>" }
Write-Output $result