Set file extended attribute by Id (deprecated) Deprecated
PUT /metadata-id/xattrs/{id}
This enpoint is deprecated, please use this one.
This method allows to set a value of a specified extended file attribute leaving other ones intact.
Example cURL requests
Set extended file attribute
curl -X PUT -H "X-Auth-Token: $TOKEN" \
-H 'Content-type: application/json' -d '{ "license": "CC-0" }' \
"https://$HOST/api/v3/oneprovider/metadata-id/xattrs/$FILE_ID?extended=true"
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Id of the file. |
Request body
application/json
Extended attribute name and value.
No schema provided.
Request Examples
Shell
oneprovider-rest-cli setFileXattrById id=$FILE_ID license==CC-0Responses
application/json
204
File extended attributes updated successfuly.
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 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."
}