Storage Resource
Definition
A Storage resource represents a file or folder that has been stored within DeepVA. It is automatically created when a user uploads a file.
The Storage objects are organized in a hierarchical folder structure that is similar to a typical UNIX file system and
rooted at /
. This flexibility in the structure allows users to better organize and locate their files.
Note: A
folder
parameter with a path is required when uploading a file. If the specified folder does not exist, it is automatically created. For more information on it usage see here.
ENDPOINTS
GET /v1/storage?folder={FOLDER_PATH}
GET /v1/storage/{STORAGE_ID}
/
GET /v1/storage/{STORAGE_ID}
/file/
GET /v1/storage/{STORAGE_ID}
/thumbnail/
POST /v1/storage/
DELETE /v1/storage/{STORAGE_ID}
/
Attributes
Top level attributes
Name | Type | Description |
---|---|---|
id | string | Global identifier to access the actual resource |
url | string | DeepVA storage URI. Always null for folders. |
file_size | number | Size of the file in bytes. Always null for folders. |
name | string | Name of the stored file. In case of a folder, contains the full path to the folder |
uploaded | boolean | Flag indicating whether the storage has been uploaded. Always True for folders. |
upload_failed | boolean | Flag indicating whether the storage upload failed or succeeded |
is_image | boolean | Flag indicating whether the storage is an image or not |
is_folder | boolean | Flag indicating whether the storage is a folder or not |
JSON Example
The following JSON snippet is showing a batch object.
[
{
"id": 123579,
"url": "storage://SzSVeq9FWjgiwMUL2e85",
"file_size": 6966,
"name": "mm",
"uploaded": true,
"upload_failed": false,
"is_image": true,
"is_folder": false
},
{
"id": 123580,
"url": "storage://Op6tM7vlQMNbOgogOHkU",
"file_size": 7540,
"name": "mm2",
"uploaded": true,
"upload_failed": false,
"is_image": true,
"is_folder": false
},
{
"id": 123575,
"url": null,
"file_size": null,
"name": "/Disney - Images[ae5b8152]/",
"uploaded": true,
"upload_failed": false,
"is_image": false,
"is_folder": true
},
]
ENDPOINTS
GET /v2/storage?folder={FOLDER_PATH}
GET /v2/storage/{STORAGE_ID}
/
GET /v2/storage/{STORAGE_ID}
/file/
GET /v2/storage/{STORAGE_ID}
/thumbnail/
POST /v2/storage/
DELETE /v2/storage/{STORAGE_ID}
/
Attributes
Top level attributes
Name | Type | Description |
---|---|---|
id | string | Global identifier to access the actual resource |
url | string | DeepVA storage URI. Always null for folders. |
file_size | number | Size of the file in bytes. Always null for folders. |
name | string | Name of the stored file. In case of a folder, contains the full path to the folder |
uploaded | boolean | Flag indicating whether the storage has been uploaded. Always True for folders. |
upload_failed | boolean | Flag indicating whether the storage upload failed or succeeded |
storage_type | boolean | IMAGE , VIDEO , AUDIO or FOLDER |
uploaded_at | boolean | Time at which the storage was uploaded (ISO Time String) |
JSON Example
The following JSON snippet is showing a batch object.
{
"total": 3,
"next": null,
"prev": null,
"limit": 10,
"offset": 0,
"data": [
{
"id": 123579,
"url": "storage://SzSVeq9FWjgiwMUL2e85",
"file_size": 6966,
"name": "mm",
"uploaded": true,
"upload_failed": false,
"storage_type": "IMAGE",
"uploaded_at": "2023-03-10T18:14:56.623460Z"
},
{
"id": 123580,
"url": "storage://Op6tM7vlQMNbOgogOHkU",
"file_size": 7540,
"name": "mm2",
"uploaded": true,
"upload_failed": false,
"storage_type": "IMAGE",
"uploaded_at": "2023-03-10T18:14:56.779741Z"
},
{
"id": 123575,
"url": null,
"file_size": null,
"name": "/Disney - Images[ae5b8152]/",
"uploaded": true,
"upload_failed": false,
"storage_type": "FOLDER",
"uploaded_at": "2023-03-10T18:14:56.598659Z"
}
]
}