Add QoS requirement
Adds new QoS requirement for given file or directory. This triggers data replication (if needed) based on requirements defined in new QoS requirement.
For more information about QoS, please see this.
Example cURL requests
Add QoS requirement for file
curl -H "X-Auth-Token: $TOKEN" -X POST \
-H "Content-type: application/json" \
-d '{ "expression": "country=FR", "replicasNum": 2, "fileId": $FILE_ID }' \
"https://$HOST/api/v3/oneprovider/qos_requirements"
Request body
QoS requirement properties
| Property | Type & Description |
|---|---|
fileId string Id of file or directory requirement is going to be created for. | |
expression string Expression used to select storages on which file should be replicated. | |
replicasNum integer Number of required file replicas. | |
Request Examples
{
"fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
"expression": "country=FR",
"replicasNum": 2
}Responses
The request has been accepted and the result is the QoS requirement Id (e.g. 'fc05cfc92eda7a054b835bc1ee4a1372'). Also URI of the QoS requirement in form https://$HOST/api/v3/oneprovider/qos_requirements/{qid} is returned in the response Location header.
| Property | Type & Description |
|---|---|
qosRequirementId string QoS requirement Id. | |
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}File not found.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}