Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get statistics of auto storage import mechanism.

GET /provider/spaces/{id}/storage-import/auto/stats

Returns requested statistics of auto storage import mechanism for given space on this provider.

Path parameters

Parameter Type & Description
id required
string

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

Query parameters

Parameter Type & Description
period required
string

Predefined time period for which the statistics should be fetched.

metrics required
string

Specify which statistic metrics should be returned - strings delimited with comma. Accepted values are: queueLength, createdFiles, modifiedFiles, deletedFiles

Request Examples

Shell
onepanel-rest-cli -u onepanel:$PASSPHRASE --host https://$HOST:9443 getAutoStorageImportStats id=$SPACE_ID period=minute metrics='queueLength,createdFiles'

Responses

application/json
200

Status and statistics of auto storage import mechanism in given space.

PropertyType & Description
queueLength
object (TimeStats)

Statistics of auto storage import jobs queue length.

lastValueDate required
string

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

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.

createdFiles
object (TimeStats)

Statistics of count of created files detected by auto storage import.

lastValueDate required
string

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

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.

modifiedFiles
object (TimeStats)

Statistics of count of modified files detected by auto storage import.

lastValueDate required
string

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

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.

deletedFiles
object (TimeStats)

Statistics of count of deleted files detected by auto storage import.

lastValueDate required
string

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

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
{
  "queueLength": {
    "lastValueDate": "2017-06-22T13:29:39.654Z",
    "values": [
      4,
      8,
      12,
      16,
      20,
      10,
      4,
      2,
      0,
      0,
      0,
      0
    ]
  },
  "createdFiles": {
    "lastValueDate": "2017-06-22T13:29:39.654Z",
    "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.