Set file attribute (deprecated) Deprecated
PUT /metadata/attrs/{path}
This enpoint is deprecated, please use this one.
This method allows to set a value of a regular file attribute.
Currently only POSIX mode can be changed by sending:
{ "mode": "0777" }
where the POSIX mode is specified in octal notation.
Example cURL requests
Set file POSIX mode
curl -X PUT -H "X-Auth-Token: $TOKEN" \
-H 'Content-type: application/json' -d '{ "mode": "0777" }'
"https://$HOST/api/v3/oneprovider/metadata/attrs/MySpace1/File2.txt"
Path parameters
| Parameter | Type & Description |
|---|---|
| path required | string File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt') |
Request body
application/json
Attribute name and value.
No schema provided.
Request Examples
Shell
echo '{"mode": "0777"}' | oneprovider-rest-cli setFileAttr path='/MySpace/testfiles/file1.txt' -Responses
application/json
204
File 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."
}