Update Active Directory Domains ​
PUT /winapi/activedirectory
Updating an existing Active Directory Domain 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 'Active Directory Domains' Security Administrator's role in Passwordstate.
Powershell
#JSON data for the object
$Body = @{
ADDomainID = "1"
DefaultDomain = "True"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/winapi'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/activedirectory -ContentType "application/json" -Body $jsonData -UseDefaultCredentials
Write-Output $result