Get file json metadata by Id (deprecated) Deprecated
This enpoint is deprecated, please use this one.
This method returns the json metadata associated with specified file, directory or space by Id.
By default the method returns the complete json metadata. But it is possible to request
only a part of the document by specifying filter_type and filter attributes in the query.
Supported filter types are:
- keypath - list of JSON keys which point to requested JSON object,
separated by
., array elements should be expressed as[i](e.g.key1.key2.[2].key3)
Example cURL requests
Get specific JSON value from metadata document
curl -H "X-Auth-Token: $TOKEN" -X GET \
https://$HOST/api/v3/oneprovider/metadata-id/json/$FILE_ID?filter_type=keypath&filter=key1.key2.[2].key3
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Id of the file. |
Query parameters
| Parameter | Type & Description |
|---|---|
| filter_type | string The type of filter to apply to the metadata document. |
| filter | string The filter to apply to the metadata document before returning. |
| inherited | boolean When set to true, this operation will merge the metadata documents from parent directories as well as entire space into a single JSON document. |
Request Examples
oneprovider-rest-cli getFileJsonMetadataById id=$FILE_ID inherited=falseResponses
JSON metadata returned successfully.
No schema provided.
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."
}