Create a new harvester for the current user
Creates a new harvester as current user. The user automaticaly becomes the harvesters' member.
This operation can be invoked on behalf of the current user only.
Example cURL requests
Create new user harvester
curl -u admin:password -H "Content-type: application/json" -X POST \
-X POST -d '{ "name" : "new_harvester", "endpoint" : "example.elastic.com:9200", "harvestingBackendType" : "elasticsearch_harvesting_backend" \
"config" : { "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/user/harvesters
Request body
New harvester parameters.
| 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 form https://$HOST/api/onezone/v3/user/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."
}
}