Create or update a SMB/CIFS repository (location)
Use this API to create a new location to crawl files located on a server reached through SMB/CIFS.
Requirement: OpenSearchServer v1.5
The URLs and HTTP methods used by this API are different from other OSS APIs, please give this document a careful read.
Call parameters
URL: /services/rest/crawler/file/repository/inject/smb/{index_name}/{result_type}?path={path}&ignoreHiddenFile={ignoreHiddenFile}&includeSubDirectory={includeSubDirectory}&enabled={enabled}&delay={delay}
Method: PUT
URL parameters:
- index_name (required): The name of the index.
- result_type (required): The type of returned result (
json
orxml
). - path: The path to connect to the server and folder.
- ignoreHiddenFile: Whether hidden files should be ignored during crawling (
true
orfalse
). - includeSubDirectory: Whether sub-directories should be crawled (
true
orfalse
). - enabled: Whether this new location should be eligible for crawling (
true
orfalse
). - delay: delay between each file access in ms (defaults to 0).
- username: user name to connect to the server.
- password: password to connect to the server.
- domain: domain to connect to the server.
- host: host to connect to the server.
Success response
The new location has been created or updated.
HTTP code:
200
Content (json):
{
"successful":true,
"info":"Inserted"
}
Error response
The request failed. The reason is provided in the content.
HTTP code:
500