Search Privileged Account Credential ​
GET /api/privaccount
Searching for Privileged Account Credentials can be achieved via multiple criteria, as outlined by the fields below. You can search using just one field, or multiple to further narrow down the search results. You must specify the Privileged Account Credential API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- PrivilegedAccountID
- Description
- UserName
- SiteID
- SiteLocation
Powershell
# Search by PrivilegedAccountID
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?PrivilegedAccountID=<value>'
# Search by Description
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?Description=<value>'
# Search by UserName
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?UserName=<value>'
# Searching by SiteID
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?SiteID=<value>'
# Searching by SiteLocation
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?SiteLocation=<value>'
# Search by UserName and SiteLocation
$PasswordstateUrl = 'https://passwordstate/api/privaccount/?UserName=<value>&SiteLocation=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200
[
{
"PrivilegedAccountID":"7",
"Description":"AD Account for Priv Account Management",
"UserName":"domain\ps_accnt",
"PasswordID":"0",
"AccountType":"Active Directory",
"SiteID":"0",
"SiteLocation":"Internal"
}
]