Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get statistics of storage synchronization

GET /provider/spaces/{id}/sync

Returns requested statistics of storage synchronization for given space on this provider.

Path parameters

Parameter Type & Description
id required
string

The Id of a space for which sync stats should be returned.

Query parameters

Parameter Type & Description
period
string

Predefined time period for which the statistics should be fetched.

metrics
string

Specify which statistic metrics should be returned - strings delimited with comma.

Request Examples

Shell
onepanel-rest-cli -u onepanel:$PASSPHRASE --host https://$HOST:9443 getProviderSpaceSyncStats id=$SPACE_ID started_after="2017-10-20T21:39:37"

Responses

application/json
200

Space synchronization status and statistics.

PropertyType & Description
importStatus
string

Describes import algorithm run status.

Enum:
inProgressdone
updateStatus
string

Describes update algorithm run status.

Enum:
waitinginProgress
stats
object (TimeStatsCollection)

Collection of statistics for requested metrics.

queueLength
object (TimeStats)

Statistics of storage sync jobs queue length.

name required
string

Name of metric for which this object holds statistics.

Enum:
queueLengthinsertCountupdateCountdeleteCount
lastValueDate required
string

Date of last measurement value in this object in ISO 8601 format.

period
string

Predefined time period for which the statistics were fetched.

Enum:
minutehourday
values required
array of numbers

List of sample values for given metric. The used period is divided into array-length number of parts. E.g. if the used period is an hour, and if there are 12 values in this array, every value is a value for 1/12 of day, which gives value for every hour of the day. If the value is null, there is no sample for given time part.

insertCount
object (TimeStats)

Statistics of storage sync imported files.

name required
string

Name of metric for which this object holds statistics.

Enum:
queueLengthinsertCountupdateCountdeleteCount
lastValueDate required
string

Date of last measurement value in this object in ISO 8601 format.

period
string

Predefined time period for which the statistics were fetched.

Enum:
minutehourday
values required
array of numbers

List of sample values for given metric. The used period is divided into array-length number of parts. E.g. if the used period is an hour, and if there are 12 values in this array, every value is a value for 1/12 of day, which gives value for every hour of the day. If the value is null, there is no sample for given time part.

updateCount
object (TimeStats)

Statistics of storage sync updated files.

name required
string

Name of metric for which this object holds statistics.

Enum:
queueLengthinsertCountupdateCountdeleteCount
lastValueDate required
string

Date of last measurement value in this object in ISO 8601 format.

period
string

Predefined time period for which the statistics were fetched.

Enum:
minutehourday
values required
array of numbers

List of sample values for given metric. The used period is divided into array-length number of parts. E.g. if the used period is an hour, and if there are 12 values in this array, every value is a value for 1/12 of day, which gives value for every hour of the day. If the value is null, there is no sample for given time part.

deleteCount
object (TimeStats)

Statistics of storage sync deleted files.

name required
string

Name of metric for which this object holds statistics.

Enum:
queueLengthinsertCountupdateCountdeleteCount
lastValueDate required
string

Date of last measurement value in this object in ISO 8601 format.

period
string

Predefined time period for which the statistics were fetched.

Enum:
minutehourday
values required
array of numbers

List of sample values for given metric. The used period is divided into array-length number of parts. E.g. if the used period is an hour, and if there are 12 values in this array, every value is a value for 1/12 of day, which gives value for every hour of the day. If the value is null, there is no sample for given time part.

Example

application/json
{
  "importStatus": "done",
  "updateStatus": "inProgress",
  "stats": {
    "queueLength": {
      "name": "queueLength",
      "lastValueDate": "2017-06-22T13:29:39.654Z",
      "period": "hour",
      "values": [
        4,
        8,
        12,
        16,
        20,
        10,
        4,
        2,
        0,
        0,
        0,
        0
      ]
    },
    "insertCount": {
      "name": "insertCount",
      "lastValueDate": "2017-06-22T13:29:39.654Z",
      "period": "hour",
      "values": [
        4,
        8,
        12,
        16,
        20,
        10,
        4,
        2,
        0,
        0,
        0,
        0
      ]
    }
  }
}
401

Unauthorized request.

403

Forbidden request.

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."
  }
}
503

Services needed to fulfill this request are not running.