Create a new harvester for given group
Creates a new harvester for a specific group.
This operation requires group_add_harvester privilege.
For administrator who does not belong to this group
oz_groups_add_relationships and oz_harvesters_create privileges are required.
Example cURL requests
Create new harvester for group
curl -u admin:password -H "Content-type: application/json" \
-X POST -d '{ "name" : "new_harvester", "harvestingBackendEndpoint" : "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/groups/$GROUP_ID/harvesters
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
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
Id of the created harvester in the form /groups/{id}/harvesters/{hid} 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."
}
}Forbidden 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."
}
}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."
}
}