Search Password Folder Documents ​
GET /api/searchdocuments/folder
Searching for documents in Password Folders can be achieved by passing a GET request, and either the API Key from the folder itself, or the Documents API key available on the screen Administration -> System Settings -> API.
- You can search within a specific Folder by specifying the FolderID, or if you leave this blank, you can search across all Password Folders - the system wide Documents API Key must be used in this instance.
- 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/api/searchdocuments/folder/<folderid>?search=<searchcriteria>'
# Search across all Folders, based on document properties
$PasswordstateUrl = 'https://passwordstate/api/searchdocuments/folder/?search=<searchcriteria>'
# Return all documents in a Folder
$PasswordstateUrl = 'https://passwordstate/api/searchdocuments/folder/<folderid>?search='
# Return all documents in all Folders
$PasswordstateUrl = 'https://passwordstate/api/searchdocuments/folder/?search='
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" }Json
# 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"
}
]