File crawler status report
Use this API to get the file crawler's current status.
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/status/{index_name}/{result_type}
Method: GET
URL parameters:
- index_name (required): The name of the index.
- result_type (required): Type of returned result (
json
orxml
).
Success response
The current status of the file crawler.
HTTP code:
200
Content (json):
{
"successful":true,
"info":"STOPPED"
}
Error response
The request failed. The reason is provided in the content.
HTTP code:
500
Sample call
Using CURL:
Simple call:
curl -XGET -H \
http://localhost:8080/services/rest/crawler/file/status/my_index/json
Using jQuery:
$.ajax({
type: "GET",
dataType: "json",
url: "http://localhost:8080/services/rest/crawler/file/status/my_index/json"
}).done(function (data) {
console.log(data);
});