Create new harvester
Creates new harvester.
This operation requires oz_harvesters_create admin privilege.
See also:
Create a new harvester for the current user
Create a new harvester for given group
Example cURL requests
Create new harvester
curl -u username:password -H "Content-type: application/json" \
-X POST -d '{ "name" : "new_harvester", "harvestingBackendEndpoint" : "example.elastic.com:9200", "harvestingBackendType" : "elasticsearch_harvesting_backend" \
"guiPluginConfig" : { "typeMapping": [ { "id": 0, "name": "Type 1" }, { "id": 1, "name": "Type 1" } ],
"externalHelpLink": "http://example.com/some_help_page",
"refreshDataTimeout": 1000 }
}' \
https://$HOST/api/v3/onezone/harvesters
Request body
Harvester properties.
| Property | Type & Description | ||
|---|---|---|---|
name string The name of the harvester. | |||
harvestingBackendType string Type of external harvesting backend that will provide persistence and analytics for harvested metadata. Can be chosen from predefined backends and optionally custom ones configured by Onezone admins. Can be omitted if default harvester backend is set up in Onezone. | |||
harvestingBackendEndpoint string Endpoint where the specified harvesting backend can be reached by Onezone to feed incoming metadata and perform queries. Can be omitted if default harvester backend is set up in Onezone. | |||
guiPluginConfig object (HarvesterGuiPluginConfig) Custom JSON configuration passed to harvester GUI plugin.
| |||
Request Examples
{
"name": "My private harvester",
"harvestingBackendType": "elasticsearch_harvesting_backend",
"harvestingBackendEndpoint": "example.elastic.com:9200",
"guiPluginConfig": {
"typeMapping": [
{
"id": 0,
"name": "Type 1"
},
{
"id": 1,
"name": "Type 1"
}
],
"externalHelpLink": "http://example.com/some_help_page",
"refreshDataTimeout": 1000
}
}Responses
URI of the created harvester in the form https://$HOST/api/onezone/v3/harvesters/{id} is returned in the response Location header.
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."
}
}