Search Host Folders ​
GET /api/hostfolders
Searching for Host Folders 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 Host Folders, you must specify the Hosts API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- FolderID
- FolderName
- Description
- TreePath
- SiteID
- SiteLocation
Powershell
# Search by Folder Name
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?FolderName=<value>'
# Search by Folder Name and TreePath
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?FolderName=<value>&TreePath=<value>'
# Searching by FolderID
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?FolderID=<value>'
# Search by SiteID
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?SiteID=<value>'
# Search by Site Location
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?SiteLocation=<value>'
# Search by Folder Name and Site Location
$PasswordstateUrl = 'https://passwordstate/api/hostfolders/?FolderName=<value>&SiteLocation=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200
[
{
"FolderID":12345,
"FolderName":"Microsoft Database Servers",
"TreePath":"\",
"PropagatePermissions":"False",
"Description":"All Microsoft database servers",
"HostNameMatch":"",
"TagMatch":"",
"HostType":"",
"OperatingSystems":"",
"DatabaseServerType":"SQL Server",
"SiteID":"0",
"SiteLocation":"Internal"
}
]