Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Configure space auto-cleaning mechanism

PATCH /provider/spaces/{id}/auto-cleaning/configuration

Configures space auto-cleaning mechanism in the space.

Path parameters

Parameter Type & Description
id required
string

The Id of a space.

Request body

New configuration of space auto-cleaning mechanism.

PropertyType & Description
enabled
boolean

If true, auto-cleaning mechanism is enabled in the space.

threshold
integer

Amount of data [b], which should trigger the auto-cleaning in the space. Only replicas maintained by this storage provider will be removed. This parameter is required to enable auto-cleaning.

target
integer

Amount of data [b], at which the auto-cleaning process should stop. This parameter is required to enable auto-cleaning.

rules
object (SpaceAutoCleaningRules)

Rules used to select certain list of file replicas that can be evicted by auto-cleaning mechanism.

enabled
boolean

Informs whether selective rules should be used by auto-cleaning mechanism.

maxOpenCount
object (SpaceAutoCleaningRuleSetting)

Files that have been opened less than maxOpenCount times may be cleaned. The default value is 9007199254740991 (2^53-1).

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

minHoursSinceLastOpen
object (SpaceAutoCleaningRuleSetting)

Files that haven't been opened for longer than or equal to given period [h] may be cleaned. The default value is 0.

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

minFileSize
object (SpaceAutoCleaningRuleSetting)

Only files which size [b] is greater than given value may be cleaned. The default value is 1.

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

maxFileSize
object (SpaceAutoCleaningRuleSetting)

Only files which size [b] is less than given value may be cleaned. The default value is 1125899906842624 (1 PiB).

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

maxHourlyMovingAverage
object (SpaceAutoCleaningRuleSetting)

Files that have moving average of open operations count per hour less than given value may be cleaned. The average is calculated in 24 hours window. The default value is 9007199254740991 (2^53-1).

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

maxDailyMovingAverage
object (SpaceAutoCleaningRuleSetting)

Files that have moving average of open operations count per day less than given value may be cleaned. The average is calculated in 30 days window. The default value is 9007199254740991 (2^53-1).

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

maxMonthlyMovingAverage
object (SpaceAutoCleaningRuleSetting)

Files that have moving average of open operations count per month less than given value may be cleaned. The average is calculated in 12 months window. The default value is 9007199254740991 (2^53-1).

enabled
boolean

Informs whether given setting is enabled.

value
integer

Integer value of a given setting.

Request Examples

application/json
{
  "enabled": true,
  "target": 1073741824,
  "threshold": 1099511627776,
  "rules": {
    "enabled": true,
    "maxOpenCount": {
      "enabled": true,
      "value": 1000
    },
    "minHoursSinceLastOpen": {
      "enabled": true,
      "value": 10
    },
    "minFileSize": {
      "enabled": true,
      "value": 1
    },
    "maxFileSize": {
      "enabled": true,
      "value": 1024
    },
    "maxHourlyMovingAverage": {
      "enabled": true,
      "value": 10
    },
    "maxDailyMovingAverage": {
      "enabled": false,
      "value": 100
    },
    "maxMonthlyMovingAverage": {
      "enabled": false
    }
  }
}

Responses

application/json
204

Auto-cleaning configuration has been updated.

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