Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Update space support parameters of provider

PATCH /spaces/{id}/providers/{pid}/support_parameters

Updates space support parameters of a provider in the space.

Authorization depends on the modified parameters (see respective descriptions).

Example cURL requests

Update space support parameters of provider

curl -u username:password -H "Content-type: application/json" \
-X PATCH -d '{"dirStatsServiceEnabled": true}' \
https://$HOST/api/v3/onezone/spaces/$SPACE_ID/providers/$PROVIDER_ID/support_parameters

Path parameters

Parameter Type & Description
id required
string

Space Id.

pid required
string

Provider Id.

Request body

application/json
PropertyType & Description
accountingEnabled
boolean

Indicates if accounting is enabled. The accounting mechanism utilizes directory statistics to keep track of quota usage within a space for the corresponding supporting provider.
It can be toggled by an administrator of the provider with cluster_update privilege or by an administrator of the zone with oz_spaces_update privilege.

dirStatsServiceEnabled
boolean

Indicates if the directory statistics service should be enabled. The service gathers statistics concerning logical and physical directory size, file count and update times.
It can be toggled by a space member with space_update privilege, by an administrator of the provider with cluster_update privilege or by an administrator of the zone with oz_spaces_update privilege.
NOTE: Directory statistics are required for accounting and cannot be disabled independently.
NOTE: Statistics collection causes an additional load on the provider and has a slight negative impact on file operation performance.
NOTE: Applying a new setting may take some time, depending on the space size and current state of the directory statistics service. This process is reflected by the initializing and stopping intermediate statuses.

dirStatsServiceStatus
string

The current status of the directory statistics service, as reported by the supporting provider. It cannot be modified by a user. May be different from the dirStatsServiceEnabled setting if the service is in one of the intermediate states or the provider has not yet acknowledged a change in the parameters.

Enum:
initializingenabledstoppingdisabled

Request Examples

application/json
{
  "accountingEnabled": false,
  "dirStatsServiceEnabled": true
}

Responses

application/json
204

Space support parameters have been updated successfully.

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