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://$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
| Property | Type & Description |
|---|---|
method string Method of request to Elasticsearch. Enum: postget | |
path string Resource path relative to index | |
body any Body of request to Elasticsearch. | |
Request Examples
{
"method": "get",
"path": "entry_id?stored_fields=tags,counter"
}Responses
Results of the query on given index.
| Property | Type & Description |
|---|---|
headers object Headers of the Elasticseach response. | |
code integer Status code of the Elasticsearch response. | |
body string 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.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}