Search Remote Session Credentials ​
GET /api/rscredentials
Searching for Remote Session 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. In order to search for Remote Session Credentials, you must specify the Remote Session Credentials API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- CredentialID
- Description
- RemoteConnectionType
- SiteID
- SiteLocation
Powershell
# Search by CredentialID
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?CredentialID=<value>'
# Search by Description
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?Description=<value>'
# Search by Description and Remote Connection Type
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?Description=<value>&RemoteConnectionType=<value>'
# Search by SiteID
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?SiteID=<value>'
# Search by Site Location
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?SiteLocation=<value>'
# Search by Description and Site Location
$PasswordstateUrl = 'https://passwordstate/api/rscredentials/?Description=<value>&SiteLocation=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200
[
{
"CredentialID":"1011",
"Description":"RDP Sessions Domain Machines",
"HostName":"",
"HostNameExclude":"",
"HostType":"",
"OperatingSystems":"",
"RemoteConnectionType":"RDP",
"RemoteConnectionParameters":"",
"PasswordID":"57783",
"PasswordListID":"183",
"PasswordList":"Active Directory Accounts",
"ImageFileName":"activedirectory.png",
"TreePath":"\Infrastructure\Active Directory Accounts",
"ProvideAccessReason":"False",
"Title":"My Domain Account",
"UserName":"userxyz",
"SiteID":"0",
"SiteLocation":"Internal"
}
]