Search for Folders ​
GET /api/folders
Searching for 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 Folders, you must specify the System Wide API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- FolderName
- Description
- TreePath
- SiteID
- SiteLocation
Note: You can perform an exact match search by enclosing your search criteria in double quotes i.e. "MyFolder".
Powershell
# Powershell Request (GET)
# Search by Folder Name
$PasswordstateURL = 'https://passwordstate/api/folders/?FolderName=<value>'
# Search by Description
$PasswordstateURL = 'https://passwordstate/api/folders/?Description=<value>'
# Search by TreePath
$PasswordstateURL = 'https://passwordstate/api/folders/?TreePath=<value>'
# Search Folders in root of Passwords Home
$PasswordstateURL = 'https://passwordstate/api/folders/?TreePath="\"&FolderName=<value>'
# Search by SiteID
$PasswordstateURL = 'https://passwordstate/api/folders/?SiteID=<value>'
# Search by Site Location
$PasswordstateURL = 'https://passwordstate/api/folders/?SiteLocation=<value>'
# Search by Folder Name and Site Location
$PasswordstateURL = 'https://passwordstate/api/folders/?FolderName=<value>&SiteLocation=<value>'
$result = Invoke-Restmethod -Method GET -Uri $PasswordstateURL -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200
[
{
"FolderID":86,
"FolderName":"Contoso",
"Description":"All passwords for customer Contoso",
"TreePath":"\Customers\Contoso"
}
]