Delete a Host ​
DELETE /winapi/hosts
Deleting a Host is possible by submitting a 'DELETE' HTTP Verb to the API. When a Host is deleted, you will be returned a Http Status Code 04 204 - NoContent.
Powershell
# Delete using HostName
$PasswordstateURL = 'https://passwordstate/winapi/hosts/<HostName>'
Invoke-Restmethod -Method Delete -Uri $PasswordstateURL -UseDefaultCredentials
# Delete using HostID
$PasswordstateURL = 'https://passwordstate/winapi/hosts/?HostID=<HostID>'
Invoke-Restmethod -Method Delete -Uri $PasswordstateURL -UseDefaultCredentialsJson
# Response
HTTP/1.1 204 No Content