Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get QoS summary for file or directory

GET /data/{id}/qos_summary

Returns QoS summary for a file specified by $FILE_ID. QoS summary contains information about effective QoS, which is calculated by merging QoS requirements defined directly for file or directory with QoS requirements defined for all its ancestors.

Example cURL requests

Get file QoS summary

curl -H "X-Auth-Token: $TOKEN" -X GET "https://$HOST/api/v3/oneprovider/data/$FILE_ID/qos_summary"

{
    "requirements": [{"$QOS_REQ_ID": "pending"}],
    "status": "pending"
}

Path parameters

Parameter Type & Description
id required
string

Id of the file or directory.

Request Examples

Shell
oneprovider-rest-cli getFileQosSummary id=$FILE_ID

Responses

application/json
200

QoS summary for file or directory.

Property
Type & Description
requirements
object

Mapping including all QoS requirements (Ids) that influence given file/directory and corresponding information of fulfillment status for this file/directory (fulfilled/pending/impossible).

status
string

Aggregated status of all QoS requirements for given file or directory.

Enum:
fulfilled pending impossible

Example

application/json
{
  "requirements": {
    "c84f669f9522c46976fee490d80651f0": "pending",
    "22c46976fee490d80651f0c84f669f95": "fulfilled"
  },
  "status": "pending"
}
400

Invalid request.

Property
Type & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
403

Forbidden request.

Property
Type & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
404

File or directory not found.

Property
Type & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
500

Internal server error.

Property
Type & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}