Storage: File Management: Search
Search
Searches for a file or directory on a fileserver
The Pattern supports wildcards(*, ?, ..)
Authentication Methods
- With a username and password
Input Parameter | Type | Description |
---|---|---|
Token* | String | Security token |
FileserverName* | String | Fileserver Name |
Path* | String | Path |
Pattern* | String | Pattern to search for |
Output Parameter | Type | Description |
---|---|---|
Paths | PathCollection | Array with a list of all files and folders within the passed folder |
EXAMPLES
Basic Search
curl -v 'https://storage.example.com/storage/api.php?Token=ms28lbbsql627i3ftmoq2j00q2&Task=Search&Path=/directory&Pattern=*.txt'
RESPONSE
<Response>
<Status>1</Status>
<Message></Message>
<FileInfos>
<FileInfo>
<Name>abc.txt</Name>
<Path>/directory/</Path>
<IsFolder>false</IsFolder>
<LastModifiedDstamp>1247989470</LastModifiedDstamp>
<Size>1247990693</Size>
<HasNotifications>true</HasNotifications>
<Notification>nmnt000000000001</Notification>
<HasPreview>false</HasPreview>
<IsEditable>false</IsEditable>
</FileInfo>
<FileInfo>
<Name>testdirectory</Name>
<Path>/directory/</Path>
<IsFolder>true</IsFolder>
<LastModifiedDstamp>1247990719</LastModifiedDstamp>
<Size></Size>
<HasNotifications>false</HasNotifications>
<Notification></Notification>
<HasPreview>false</HasPreview>
<IsEditable>false</IsEditable>
</FileInfo>
</FileInfos>
</Response>
Filtering only directory
Type can be 'Directory' or 'File'
curl -v 'https://storage.example.com/storage/api.php?Token=ms28lbbsql627i3ftmoq2j00q2&Task=Search&Path=/directory&Pattern=test&FilterBy[]=Type&FilterValue[]=Directory'
RESPONSE
<Response>
<Status>1</Status>
<Message></Message>
<FileInfos>
<FileInfo>
<Name>testdirectory</Name>
<Path>/directory/</Path>
<IsFolder>true</IsFolder>
<LastModifiedDstamp>1247990719</LastModifiedDstamp>
<Size></Size>
<HasNotifications>false</HasNotifications>
<Notification></Notification>
<HasPreview>false</HasPreview>
<IsEditable>false</IsEditable>
</FileInfo>
</FileInfos>
</Response>