Search Password Folder Documents ​
GET /winapi/searchdocuments/folder
Searching for documents in Password Folders can be achieved by passing a GET request, and the level of access to documents is the same as when the user is logged into the web User Interface.
- You can search within a specific Folder by specifying the FolderID, or if you leave this blank, you can search across all Password Folders
- If you want to return all documents in a Folder, or across all Folders, you can also leave 'searchcriteria' blank.
- Searching is performed on the Document Name and Description, as well as the name of the Folder the document belongs to.
Powershell
PowerShell Request
# Search within a specific Folder, based on document details
$PasswordstateUrl = 'https://passwordstate/winapi/searchdocuments/folder/<folderid>?search=<searchcriteria>'
# Search across all Folders, based on document properties
$PasswordstateUrl = 'https://passwordstate/winapi/searchdocuments/folder/?search=<searchcriteria>'
# Return all documents in a Folder
$PasswordstateUrl = 'https://passwordstate/winapi/searchdocuments/folder/<folderid>?search='
# Return all documents in all Folders
$PasswordstateUrl = 'https://passwordstate/winapi/searchdocuments/folder/?search='
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -UseDefaultCredentialsJson
# Response
HTTP/1.1 200
[
{
"DocumentID": 27,
"DocumentName": "Installation_Instructions.pdf",
"DocumentDescription": "",
"Modified": "2025-12-10 10:12:00",
"ModifiedBy": "Fistname Surname",
"FileSize": "128 KB",
"FolderID": 3874,
"FolderName": "Infrastructure",
"TreePath": "\Infrastructure"
}
]