Query harvester index
Performs query to index {idx} in harvester {id}.
This operation does not require any privileges when the harvester is public
otherwise being member of the harvester is required.
For administrators who do not have to be members of this harvester,
oz_harvesters_view privilege is required.
Request body and response depend on selected harvester_plugin. Below examples are for elasticsearch_plugin.
Example cURL requests
query harvester index
curl -u username:password -H "Content-type: application/json" -X POST \
-d '{ "method" : "get", "path" : "resource_id"}'
https://$ZONE_HOST/api/v3/onezone/harvesters/$HARVESTER_ID/indices/$INDEX_ID/query
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Harvester Id. |
| idx required | string Index Id. |
Request body
Method of request to Elasticsearch.
Resource path relative to index
Body of request to Elasticsearch.
Request Examples
{
"method": "get",
"path": "entry_id?stored_fields=tags,counter"
}Responses
Results of the query on given index.
Headers of the Elasticseach response.
Status code of the Elasticsearch response.
Body of the Elasticsearch response.
Example
{
"headers": {
"content-type": "application/json; charset=UTF-8",
"content-length": "142"
},
"code": 404,
"body": "{\"_index\":\"ngi1mdnly2i5od\",\"_type\":\"_doc\",\"_id\":\"awda\",\"found\":false}"
}Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}