Get data distribution
Returns information about distribution of a specific file among different storage providers.
Symbolic links are not supported, since data distribution is not applicable for them.
The locationsPerStorageBackend field is the same as for the Get file storage locations
endpoint.
Example cURL requests
Get file distribution
curl -H "X-Auth-Token: $TOKEN" -X GET "https://$PROVIDER_HOST/api/v3/oneprovider/data/$FILE_ID/distribution"
{
"type": "REG",
"distributionPerProvider": {
"$PROVIDER_ID1": {
"success": true,
"logicalSize": 8,
"locationsPerStorageBackend": {
"$STORAGE_ID": {
"success": true,
"location": "/file/location/on/storage"
}
},
"distributionPerStorageBackend": {
"$STORAGE_ID": {
"success": true,
"blocks": [[0,4],[6,2]],
"physicalSize": 6
}
}
},
"$PROVIDER_ID2": {
"success": false,
"error": {
"description": "Operation failed with POSIX error: enoent.",
"details": {"errno":"enoent"}
}
},
"$PROVIDER_ID3": {
"success": true,
"logicalSize": 8,
"locationsPerStorageBackend": {
"$STORAGE_ID": {
"success": false,
"error": {
"id": "requiresPosixCompatibleStorage",
"details": {
"storageId": "b2ce3858c7267a9c016296e51dc9c41cch3618",
"posixCompatibleStorages": ["posix","glusterfs","nfs","nulldevice"]
},
"description": "Cannot apply for the storage backend \"b2ce3858c7267a9c016296e51dc9c41cch3618\". This operation requires a POSIX-compatible storage backend (any of: posix, glusterfs, nfs, nulldevice)."
}
}
},
"distributionPerStorageBackend": {
"$STORAGE_ID": {
"success": true,
"blocks": [[0,4],[6,2]],
"physicalSize": 6
}
}
},
"$PROVIDER_ID4": {
"success": true,
"logicalSize": 8,
"locationsPerStorageBackend": {
"$STORAGE_ID": {
"success": true,
"location": null
}
},
"distributionPerStorageBackend": {
"$STORAGE_ID": {
"success": true,
"blocks": [],
"physicalSize": 0
}
}
}
}
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string The Id of the file |
Request Examples
oneprovider-rest-cli getDataDistribution id=$FILE_IDResponses
The distribution of the file.
| Property | Type & Description |
|---|---|
type any The type of the file:
Enum: REGDIR | |
Invalid request.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Forbidden request.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}File not found.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Internal server error.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}