Delete Remote Site Location ​
DELETE /userapi/remotesitelocations
Deleting a Remote Site Locations entry is possible by submitting a 'DELETE' HTTP Verb to the API. When a entry is deleted, you will be returned a Http Status Code of 204 - NoContent. The account executing this call must have the 'Remote Site Locations' Security Administrator's role in Passwordstate.
Please Note: Deleting a Remote Site Locations record will delete all associated records in the database. This includes Password Lists, Folders, Password records, Host records, Active Directory Domains, Privileged Account Credentials, etc. This is an irreversible process, and a restore of your database is required to get this data back.
Powershell
# PowerShell Request
$PasswordstateURL = 'https://passwordstate/userapi/remotesitelocations/?SiteID=<value>'
Invoke-Restmethod -Method Delete -Uri $PasswordstateURL -Header @{ "UserID" = "<UserID>" ; "APIKey" = "<APIKey>" }Json
# Response
HTTP/1.1 204 No Content