Set file json metadata (deprecated) Deprecated
This enpoint is deprecated, please use this one.
This method allows to set json metadata for a file, directory or space specified in the request path.
This operation will replace the previous json metadata if any.
Example cURL requests
Set JSON metadata for file
curl -H "X-Auth-Token: $TOKEN" -X PUT \
-H "Content-type: application/json" \
-d '{ "key1": { "key2": ["val1", "val2", "val3", "val4"] } }'
https://$HOST/api/v3/oneprovider/metadata/json/MySpace1/File2.txt
Path parameters
| Parameter | Type & Description |
|---|---|
| path required | string File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt') |
Query parameters
| Parameter | Type & Description |
|---|---|
| filter_type | string The type of filter to apply to the metadata document. |
| filter | string The filter allowing to set specific metadata document key. Required if filter_type is specified. |
Request body
The json metadata.
No schema provided.
Request Examples
cat metadata.json | oneprovider-rest-cli setFileJsonMetadata path='/MySpace/testfiles/file1.txt' -Responses
JSON metadata updated successfully.
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."
}