Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get harvester index stats

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

Returns details about harvesting stats of 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 index stats

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

{
  $SPACE_ID1 : {
    $PROVIDER_ID1 : {
      "currentSeq" : 5,
      "maxSeq" : 8,
      "error" : null,
      "lastUpdate" : 1557928576,
      "archival" : false
    },
    $PROVIDER_ID2 : {
      "currentSeq" : 8,
      "maxSeq" : 13,
      "error" : "Service unavailable: temporary failure.",
      "lastUpdate" : 1557928576,
      "archival" : false
    }
  },
  $SPACE_ID2 : {
    $PROVIDER_ID1 : {
      "currentSeq" : 13,
      "maxSeq" : 21,
      "error" : null,
      "lastUpdate" : 1557928576,
      "archival" : false
    },
    $PROVIDER_ID3 : {
      "currentSeq" : 21,
      "maxSeq" : 34,
      "error" : null,
      "lastUpdate" : 1557928576,
      "archival" : true
    }
  }
}

Path parameters

Parameter Type & Description
id required
string

Harvester Id.

idx required
string

Index Id.

Request Examples

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

Responses

application/json
200

JSON with an index harvesting stats.

PropertyType & Description
space_id
object
provider_id
object
currentSeq required
integer

Highest sequence number in given space in given provider already harvested in this index

maxSeq required
integer

Highest known sequence in given space in given provider

error required
string

Short description of encountered error if last harvesting failed

lastUpdate required
integer (Timestamp)

Timestamp in seconds (UNIX epoch) of the last harvesting in this index

archival required
boolean

Stats are marked archival when it is no longer possible to harvest metadata in given space in given provider (e.g space was removed from harvester)

Example

application/json
{
  "$SPACE_ID1": {
    "$PROVIDER_ID1": {
      "currentSeq": 5,
      "maxSeq": 8,
      "error": null,
      "lastUpdate": 1557928576,
      "archival": false
    },
    "$PROVIDER_ID2": {
      "currentSeq": 8,
      "maxSeq": 13,
      "error": "Service unavailable: temporary failure",
      "lastUpdate": 1557928576,
      "archival": false
    }
  },
  "$SPACE_ID2": {
    "$PROVIDER_ID1": {
      "currentSeq": 13,
      "maxSeq": 21,
      "error": null,
      "lastUpdate": 1557928576,
      "archival": false
    },
    "$PROVIDER_ID3": {
      "currentSeq": 21,
      "maxSeq": 34,
      "error": null,
      "lastUpdate": 1557928576,
      "archival": 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."
  }
}