Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Evaluate QoS expression

POST /spaces/{sid}/evaluate_qos_expression

Parses given QoS expression and evaluates it against the parameters of storages supporting the space. Returns the list of storages that match the expression. In case of invalid expression, returns an error with the parser report.

This operation requires space_manage_qos privilege.

Example cURL requests

Evaluate QoS expression

curl -X POST -H "X-Auth-Token: $TOKEN" \
-H "Content-type: application/json" \
-d "{"expression": "key = value"}" \
"https://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/evaluate_qos_expression" 

{
  "matchingStorages": {
    [{
      "id": "$STORAGE_ID",
      "name": "storage_name",
      "providerId": "$PROVIDER_ID"
    }]
}

Path parameters

Parameter Type & Description
sid required
string

Space Id in which to evaluate QoS expression.

Request body

application/json

QoS expression to be evaluated.

No schema provided.

Request Examples

application/json
key = value

Responses

application/json
200

The list of storages matching given QoS expression (objects containing basic storage details)

Property
Type & Description
matchingStorages
array of objects (StorageDetails)
id
string

Id of storage.

name
string

Name of storage.

providerId
string

Id of provider storage belongs to.

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

Oneprovider REST API not available.

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