Delete Remote Session Credential Permission ​
DELETE /api/rscredentialpermissions
Removing a Remote Session Credential permission is possible by submitting a 'DELETE' HTTP Verb to the API. When the Remote Session Record permission is removed, you will be returned a Http Status Code of 204 - NoContent.
Powershell
# Delete using CredentialID
$Body = @{
CredentialID = "1011"
ApplyPermissionsForUserID = "domain\username"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/api/rscredentialpermissions/'
Invoke-Restmethod -Method Delete -Uri $PasswordstateURL -ContentType "application/json" -Body $jsonData -Header @{ "APIKey" = "<apikey>" }json
# Response
HTTP/1.1 204 No Content