File Crawler API

This API is deprecated, please refer to the new RESTFul API instead.

http://{server_name}:9090/filecrawler

The fileCrawler API performs actions such as:

  • create/update: creates a file crawler item.
  • start: starts the file crawler.
  • stop: stops the file crawler.

Parameters:

  • use (required): The name of the index.
  • login (optional): The login parameter. This becomes required once you create a user.
  • key (optional): The key parameter related to the login (api key). This becomes required once you create a user.
  • cmd: The command to perform: create, stop, start.
  • type: The file crawler type, chosen among the following :
  • file - Local file system instances.
  • smb - SMB file instance.
  • ftp - FTP file instance.
  • ftps - FTP with SSL file instance.
  • dropbox - Dropbox file instance.
  • enabled: This enables or disables the file crawler. It is a Boolean parameter that can be set to true or false.
  • withsubdirectory: The withsubdirectory parameter allows for creating file crawler that includes the sub directories under the current path.
    It is a Boolean parameter that can be set to true or false.
  • delay: The crawl delay for the file crawler instance.

  • ignorehidden: The ignorehidden parameter allows for ignoring hidden files in the file system. It is a Boolean parameter that can be set to true or false.
  • domain: The domain parameter for SMB and Dropbox file types.
  • username: The username parameter for SMB, FTP, FTPS or Dropbox file types.
  • password: The password parameter for SMB, FTP, FTPS or Dropbox file types.
  • host: The host parameter for SMB, FTP, FTPS or Dropbox file types.

Examples

Starting the FileCrawler instance:

http://localhost:9090/filecrawler?use=index1&cmd=start

 
Stopping the FileCrawler instance:

http://localhost:9090/filecrawler?use=index1&cmd=stop

 
Creating a FileCrawler instance:

http://localhost:9090/filecrawler?use=file&cmd=create&type=file&path=/home/opensearchserver&withsubdirectory=true&delay=10&enabled=true&ignorehidden=true

HTTP response

The following indicates that 14 documents have been deleted from the index:

<response>
<entry key="info">A new file crawler instance is created.</entry>
</response>

View/edit on GitHub