Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get harvester index details

GET /harvesters/{id}/indices/{idx}

Returns details about a specific index in the harvester.

For users who are members of harvester it requires harvester_view. For administrators who do not have to be members of this harvester, oz_harvesters_view privilege is required.

Example cURL requests

Get harvester space details

curl -u username:password -X GET \
https://$HOST/api/v3/onezone/harvesters/$HARVESTER_ID/indices/$INDEX_ID

{
  "indexId": "H8ez0CwDZ7JMYRWn1ipmBpgJHPXzIXj0-upGkf9tk",
  "name": "My study index"
  "guiPluginName": "study"
  "schema": "{ \"mappings\": { \"properties\": { \"foo\": { \"type\": \"keyword\" } } } }"
  "includeMetadata": ["json", "xattrs"]
  "includeFileDetails": ["fileName", "metadataExistenceFlags"]
  "includeRejectionReason": false
  "retryOnRejection": true
}

Path parameters

Parameter Type & Description
id required
string

Harvester Id.

idx required
string

Index Id.

Request Examples

Shell
onezone-rest-cli getHarvesterIndex id=b752ceafabb662b4e5728b2ded25cdd1 idx=f1c8b1a37aa7447b22eb65a742d40524

Responses

application/json
200

Details about a specific index in a harvester.

PropertyType & Description
indexId
string

Unique Id of the index.

name
string

The name of the index.

schema
string

Schema of the index provided as string (e.g. encoded JSON).

guiPluginName
string

Mapping of index name to one recognized by gui plugin. Allows to specify this index to be used by GUI plugin to produce search results. Recognized gui index names are listed in gui plugin manifest.

includeMetadata
array of strings

Specifies what types of file metadata should be harvested in this index. At least one type must be given.

includeFileDetails
array of strings

Specifies what file details should be harvested alongside the metadata. Enabling metadataExistenceFlags will add boolean flags saying whether the file has any metadata of certain type. The fileName field may be utilized by the GUI plugin to improve the browsing experience.

includeRejectionReason
boolean

If enabled, all harvesting errors (e.g. when the index rejects a payload due to non-matching schema) are stored as text in the index, which may be useful for later analysis.

retryOnRejection
boolean

If enabled, all payloads rejected by the harvesting backend will be automatically analysed for offending data (e.g. fields that do not match the schema), pruned and submitted again. This might slow down the harvesting process and cause nonconformant metadata to be lost.

Example

application/json
{
  "indexId": "2c0160248ba9a66f45da751ca459535a",
  "name": "My study index",
  "guiPluginName": "study",
  "schema": "{ \"mappings\": { \"properties\": { \"foo\": { \"type\": \"keyword\" } } } }",
  "includeMetadata": [
    "json",
    "xattrs"
  ],
  "includeFileDetails": [
    "fileName",
    "metadataExistenceFlags"
  ],
  "includeRejectionReason": false,
  "retryOnRejection": true
}
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."
  }
}