Get shared file or directory info
HEAD counterpart of Get shared file or directory data. Redirects (in the same way as the GET variant) to the corresponding REST endpoint in one of the supporting Oneproviders, so that the request can be served without any authentication. The provided query string (if any) is preserved during redirection.
In practice, HEAD is only meaningful for the {...}/$FILE_ID/content subpath and
only for regular files, where it returns content headers such as Content-Length
and Accept-Ranges (see the Oneprovider
REST endpoint).
It is not supported for directories, since the resulting TAR archive is created on
the fly and its Content-Length cannot be determined up front.
The endpoint will return 503 Service Unavailable when there is no suitable
Oneprovider to handle the request and 501 Not Implemented when all available
Oneproviders are in versions older than 20.02.*. If an invalid subpath
is requested, the target Oneprovider will respond with a proper error.
Example cURL requests
Get shared file content headers
curl -v -I https://$ZONE_HOST/api/v3/onezone/shares/data/$FILE_ID/content
< HTTP/1.1 307 Temporary Redirect
< location: https://provider.example.com/api/v3/oneprovider/data/$FILE_ID/content
# automatically follow redirects with -L option
curl -L -I https://$ZONE_HOST/api/v3/onezone/shares/data/$FILE_ID/content
HTTP/1.1 200 OK
content-length: 15
accept-ranges: bytes
Path parameters
| Parameter | Type & Description |
|---|---|
| file_id required | string Shared file/directory Id. |
| subpath required | string Subpath corresponding to desired Oneprovider REST API operation. |
Request Examples
onezone-rest-cli getSharedDataInfo file_id=000000000055D4E4836803640004677569646D00 subpath='content'Responses
Redirection to one of the supporting providers in the response Location header.
Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Not Implemented - all available providers are in versions older than 20.02.*.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Service Unavailable - there is no suitable provider to handle the request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}