Jump to content

Meelis Nigols

  • Content Count

  • Joined

  • Last visited

About Meelis Nigols

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. or if changing response is not possible, then at least add to documentation statement, that parent path is returned as TreePath Meelis
  2. Thanks. BTW, if substring search is possible, can i also use Reguar Expression syntax to specify search pattern? Meelis
  3. Would it be possible to change documentation and state there, that search performs substring search?
  4. I am creating folder/password list structure with a script. So i create folder if they don't exist. But if folder already exists, i need find, if next level folder/password list exists. And it is not possible to search folder/password list based on Folder ID. I have to use TreePath. And that brings me back to TreePath. The Create Folder command gets back response with newly created Folder ID, but with parent folder TreePath. when I create folder like this: $jsonData = @{ "FolderName":"Test Folder", "Description":"First API Folder", "NestUnderFolderID":"48" } | ConvertTo-Json $PasswordstateUrl = 'https://passwordstate/winapi/folders' $result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData -UseDefaultCredentials I will get back response like this: HTTP/1.1 200 [ { "FolderID": 181, "FolderName": "Test Folder", "Description": "First API Folder", "TreePath": "\parentfolder" } ] and the TreePath is not containing newly created folder name. I would suggest to change the response so, that newly created Folder Treepath (instead of parent folder TreePath) will be returned. Is it possible? Meelis
  5. Another thing that was unexpected. When searching folders by name, it turns out that folder name string is used for substring search. For example, when using next URL for search: https://passwordstate/winapi/folders/?FolderName=Folder1&TreePath=\Test then results include folders with following names (and treepaths): Folder1 (\Test\Folder1) Folder10 (\Test\Folder10) Subfolder1 (\Test\Folder*\Subfolder1 - serveral folders) Subfolder10 (\Test\Folder*\Subfolder10 - serveral folders) How can I perform search with exact match? Without that i have to construct desired TreePath and then compare all returned results to that, if I want to get only folder I'm searching for... My PasswordState build number is 8706.
  6. I found inconsistency in REST API. Response after creating folder contains folder ID fore newly created folder, and TreePath that points to parent folder. Searching for folder return object, where both FolderId and TreePath point to found folder. Now when I want to search for Password lists in specific folder, I can refer folder by TreePath, but I can't refer folder by Folder ID. Is it intended that I will need to search for newly created folder just to get correct FolderPath reference (so that I can use it in further searches)? Or would it be possible, that creating folder response will have correct TreePath pointing to just created folder, not to parent folder? My PasswordState version is 8706. I'm unable to find API documentation on public website to check for changes in documentation after my build number.
  • Create New...