Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get file-popularity configuration

GET /provider/spaces/{id}/file-popularity/configuration

Returns configuration of file-popularity mechanism in the space specified by space Id in the path.

Path parameters

Parameter Type & Description
id required
string

The Id of a space of which file-popularity configuration should be returned.

Request Examples

Shell
onepanel-rest-cli -u onepanel:$PASSPHRASE getFilePopularityConfiguration id=$SPACE_ID --host https://$HOST:9443

Responses

application/json
200

The file-popularity configuration.

PropertyType & Description
enabled
boolean

If true, collecting file-popularity mechanism in the space is enabled.

exampleQuery
string

Example curl command that can be executed to query the file-popularity view in the space.

lastOpenHourWeight
number

Weight of lastOpenHour parameter.

avgOpenCountPerDayWeight
number

Weight of avgOpenCountPerDayWeight parameter.

maxAvgOpenCountPerDay
number

Maximal value of average open count per day taken to calculate the value of popularity function.

Example

application/json
{
  "enabled": true,
  "exampleQuery": "curl -sS -k -H 'X-Auth-Token: $TOKEN' -X GET https://$HOST/api/v3/oneprovider/spaces/example_space_id/views/file-popularity?limit=10&stale=false",
  "lastOpenHourWeight": 1,
  "avgOpenCountPerDayWeight": 20,
  "maxAvgOpenCountPerDay": 100
}
401

Unauthorized request.

403

Forbidden request.

404

Space does not exist or is not supported by the provider.

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