Description

Retrieves a page (up to 50 results of files/folders) of results based any number of search criteria across the entire site the searching user has access to.

At least one search criteria must be used or an error will be returned.

Using multiple criteria narrows your search - for example, if you pass "test" into "file_name" and "jpg" into "file_extension", only jpeg files with "test" in the name will be returned in the results.

URL

All responses are in JSON format by default, to specify an XML response add ".xml" to the end of the method name (in this case "file_search_site")

https://<yoursubdomain>.filetransfers.net/api/file_search_site

Restrictions

There are no restrictions for this call.

Parameters

Bold indicates required.

ParameterDescription
file_name Find all files with a name containing this term.
date_start Find all files created/modified on or after this date. A Unix timestamp value should be passed in.
date_end Find all files created/modified before this date. A Unix timestamp value should be passed in.
size_low Find all files with a file size at least as large as this. A byte value should be passed in.
size_low_unit The size unit of the size_low value. This can be "Bytes" (default), "KB", "MB", or "GB"
size_high Find all files with a file size less than this. A byte value should be passed in.
size_high_unit The size unit of the size_high value. This can be "Bytes" (default), "KB", "MB", or "GB"
file_id_tag Find all files with a File ID containing this term
file_extension Find all files with an extension containing this term
file_comment Find all files with a comment containing this term
file_comment Find all files with a comment containing this term
file_type Find either files or folders, use 1 for files and 0 for folders.
current_page Default is 1, only necessary to grab subsequent pages of files/folders when the number of files/folders in a location exceeds 50.
sort Default is "date_desc". Other options include "date_asc", "name_desc", "name_asc", "size_desc", "size_asc", "user_desc", "user_asc"
api_key Your API Key.
timestamp The current time in Unix timestamp format.
signature Please see "User Authentication" for more information.

Sample Response

Unlike a file listing or a search in a specific location, a search across the entire site returns a set of permissions for each file/folder. Please use these to determine whether a user can perform an action on a result.

Successful response In JSON:

{"fileList":
  {"path":"\/","totalFiles":73,"filesInPage":50,"maxFilesPage":50,"files":[
      {"id":1071256,
       "name":"image1371675459160.jpg",
       "type":"file",
       "size":706638,
       "formattedSize":"690.08 KB",
       "path":"\/",
       "formattedModDate":"6\/19\/13, 4:57 pm EDT",
       "modDate":1371675460,
       "jobNumber":"0",
       "workspaceId":0,
       "username":"jsmith",
       "fileComments":3,
       "scheduledDelete":0,
       "restricted":0,
       "downloadPerm": 1,
       "batchDownloadPerm: 1,
       "deletePerm": 1,
       "batchDeletePerm": 1,
       "moveCopyPerm": 1,
       "batchMoveCopyPerm": 1,
       "renamePerm": 1,
       "sendPerm": 1,
       "sendNonUserPerm": 1}
   }
}

Successful response in XML:

<fileList>
  <path>/</path>
  <totalFiles>73</totalFiles>
  <filesInPage>50</filesInPage>
  <maxFilesPage>50</maxFilesPage>
  <files>
    <file>
      <id>1071256</id>
      <name>image1371675459160.jpg</name>
      <type>file</type>
      <size>706638</size>
      <formattedSize>690.08 KB</formattedSize>
      <path>/</path>
      <formattedModDate>6/19/13, 4:57 pm EDT</formattedModDate>
      <modDate>1371675460</modDate>
      <jobNumber>0</jobNumber>
      <workspaceId>0</workspaceId>
      <username>jsmith</username>
      <fileComments>3</fileComments>
      <scheduledDelete>0</scheduledDelete>
      <restricted>0</restricted>
      <downloadPerm>1</downloadPerm>
      <batchDownloadPerm>1</batchDownloadPerm>
      <deletePerm>1</deletePerm>
      <batchDeletePerm>1</batchDeletePerm>
      <moveCopyPerm>1</moveCopyPerm>
      <batchMoveCopyPerm>1</batchMoveCopyPerm>
      <renamePerm>1</renamePerm>
      <sendPerm>1</sendPerm>
    	<sendNonUserPerm>1</sendNonUserPerm>
    </file>
  </files>
</fileList>

Error response In JSON:

{"error":{"title":"You must search on at least one criteria","message":"Please enter at least one search criteria and try again"}}

Error response In XML:

<error>
	<title>You must search on at least one criteria</title>
 	<message>Please enter at least one search criteria and try again</message>
</error>

Want more info? Visit our Documents Library page to
get more in-depth info, like our Terms and Conditions.

GO
FileGenius Basic vs. Total
Compare Us - See How We Stack Up