Update Active Directory Domains ​
PUT /api/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. You must use the Active Directory Domain API Key.
API Key can be specified in the Header, or the Body of the PUT.
Powershell
#JSON data for the object
$Body = @{
ADDomainID = "1"
DefaultDomain = "True"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/api'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/activedirectory -ContentType "application/json" -Body $jsonData -Header @{ "APIKey" = "<apikey>" }
Write-Output $result