Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Modify harvester details

PATCH /harvesters/{id}

Updates the details about a harvester.

This operation requires harvester_update privilege or oz_harvesters_update admin privilege.

Example cURL requests

Change harvester name

curl -u username:password -H "Content-type: application/json" \
-X PATCH -d '{"name": "new_harvester12"}' \
https://$HOST/api/v3/onezone/harvesters/$HARVESTER_ID

Path parameters

Parameter Type & Description
id required
string

Harvester Id.

Request body

application/json

Harvester parameters

PropertyType & 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.

harvestingBackendEndpoint
string

Endpoint where the specified harvesting backend can be reached by Onezone to feed incoming metadata and perform queries. Note that this option should be used only when changing to a new location of the same harvester backend. Otherwise create a new harvester.

public
boolean

Public harvester allows any user to query its indices.

Request Examples

application/json
{
  "name": "My public harvester",
  "harvestingBackendType": "elasticsearch_harvesting_backend",
  "harvestingBackendEndpoint": "example.elastic.com:9200",
  "public": true
}

Responses

application/json
204

Harvester has been updated successfully.

400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}