File
Last updated
Last updated
id: Unique id for every file
parent_id: Unique id for parent file
name: name of the file
is_folder: File type, True means folder and false means file
ext:
type: Type of file
file_paths: paths of file
uuid: Unique identifier string(UUID Format)
size: Size of the file
active: Active/Inactive state of file
created_at: File creation timestamp
modified_at: Last modified timestamp of file
mime_type: Mime type of the file
num_files:
lable: The lable of the file
metadata: The file metadata
file_urls: The actual url of the file
POST
https://api.gmetri.com/sdk/file/uploadFileFromURL
Create new file from url
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"status": {
"success": true
},
"data": {
"id": 438554,
"parent_id": 438477,
"name": "1 (3).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg"
},
"uuid": "c6f34f02-0cb9-46b2-a40d-62ea41b895b7",
"size": "44891",
"active": true,
"created_at": "2022-10-20T12:53:35.228Z",
"modified_at": "2022-10-20T12:53:35.382Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/o/1.jpg"
}
}
}
POST
https://api.gmetri.com/sdk/file/get
Get file by id
{
"status": {
"success": true
},
"data": {
"id": 438555,
"parent_id": 438477,
"name": "1 (4).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1 (4).jpg"
},
"uuid": "c00b65c6-924c-47f9-a9e5-e13a88bd4bb8",
"size": "44891",
"active": true,
"created_at": "2022-10-21T09:07:57.771Z",
"modified_at": "2022-10-21T09:07:58.521Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/t/1%20(4).jpg",
"r": "https://u.vrgmetri.com/image/{{TRANSFORM_PARAMS}}/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg"
}
}
}
{
"status": {
"success": false,
"errorMessage": "No file found"
}
}
POST
https://api.gmetri.com/sdk/file/createFolder
Create folder by name inside given parent
{
"status": {
"success": true
},
"data": {
"id": 438557,
"parent_id": 438477,
"name": "new folder (1)",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-10-21T10:42:44.856Z",
"modified_at": "2022-10-21T10:42:44.856Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
}
}
{
"status": {
"success": false,
"errorMessage": "The parent node doesn't belong to the root"
}
}
POST
https://api.gmetri.com/sdk/file/listFolder
List all file and folder from root or parent folder
{
"status": {
"success": true
},
"data": [
{
"id": 438551,
"parent_id": 438477,
"name": "1 (1).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1 (1).jpg"
},
"uuid": "8f1453ed-417b-4502-988f-334550cda9b5",
"size": "44891",
"active": true,
"created_at": "2022-10-19T10:24:21.367Z",
"modified_at": "2022-10-19T10:24:22.076Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/8f1453ed-417b-4502-988f-334550cda9b5/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/8f1453ed-417b-4502-988f-334550cda9b5/t/1%20(1).jpg"
}
},
{
"id": 438553,
"parent_id": 438477,
"name": "1 (2).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1 (2).jpg"
},
"uuid": "6a20110c-fcb9-4599-a16c-66190a227152",
"size": "44891",
"active": true,
"created_at": "2022-10-19T20:25:05.934Z",
"modified_at": "2022-10-19T20:25:06.589Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/6a20110c-fcb9-4599-a16c-66190a227152/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/6a20110c-fcb9-4599-a16c-66190a227152/t/1%20(2).jpg"
}
},
{
"id": 438554,
"parent_id": 438477,
"name": "1 (3).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1 (3).jpg"
},
"uuid": "c6f34f02-0cb9-46b2-a40d-62ea41b895b7",
"size": "44891",
"active": true,
"created_at": "2022-10-20T12:53:35.228Z",
"modified_at": "2022-10-20T12:53:36.175Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/t/1%20(3).jpg"
}
},
{
"id": 438555,
"parent_id": 438477,
"name": "1 (4).jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1 (4).jpg"
},
"uuid": "c00b65c6-924c-47f9-a9e5-e13a88bd4bb8",
"size": "44891",
"active": true,
"created_at": "2022-10-21T09:07:57.771Z",
"modified_at": "2022-10-21T09:07:58.521Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/t/1%20(4).jpg"
}
},
{
"id": 438550,
"parent_id": 438477,
"name": "1.jpg",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/1.jpg",
"t": "t/1.jpg"
},
"uuid": "07aa3620-d689-41b6-8089-9296c0f318b0",
"size": "44891",
"active": true,
"created_at": "2022-10-19T10:22:10.758Z",
"modified_at": "2022-10-19T10:22:11.532Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "jpg",
"mimeType": "image/jpeg",
"resolution": {
"x": 550,
"y": 368
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/07aa3620-d689-41b6-8089-9296c0f318b0/o/1.jpg",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/07aa3620-d689-41b6-8089-9296c0f318b0/t/1.jpg"
}
},
{
"id": 438479,
"parent_id": 438477,
"name": "image-1662354253607.png",
"is_folder": false,
"ext": null,
"type": "IMAGE",
"file_paths": {
"o": "o/image-1662354253607.png",
"t": "t/image-1662354253607.jpg"
},
"uuid": "1ffd81f0-21ab-4a84-9ff3-943d43804a4e",
"size": "76351",
"active": true,
"created_at": "2022-09-15T10:21:38.019Z",
"modified_at": "2022-09-15T10:21:38.660Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": {
"ext": "png",
"mimeType": "image/png",
"resolution": {
"x": 932,
"y": 610
}
},
"file_urls": {
"o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/1ffd81f0-21ab-4a84-9ff3-943d43804a4e/o/image-1662354253607.png",
"t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/1ffd81f0-21ab-4a84-9ff3-943d43804a4e/t/image-1662354253607.jpg"
}
},
{
"id": 438481,
"parent_id": 438477,
"name": "imported",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-09-22T10:30:28.782Z",
"modified_at": "2022-09-22T10:30:28.782Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
},
{
"id": 438556,
"parent_id": 438477,
"name": "new folder",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-10-21T10:42:11.772Z",
"modified_at": "2022-10-21T10:42:11.772Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
},
{
"id": 438557,
"parent_id": 438477,
"name": "new folder (1)",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-10-21T10:42:44.856Z",
"modified_at": "2022-10-21T10:42:44.856Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
},
{
"id": 438558,
"parent_id": 438477,
"name": "new folder (2)",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-10-21T10:57:39.351Z",
"modified_at": "2022-10-21T10:57:39.351Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
},
{
"id": 438537,
"parent_id": 438477,
"name": "wizards",
"is_folder": true,
"ext": null,
"type": null,
"file_paths": null,
"uuid": null,
"size": null,
"active": true,
"created_at": "2022-09-22T10:35:07.122Z",
"modified_at": "2022-09-22T10:35:07.122Z",
"mime_type": null,
"num_files": null,
"label": null,
"metadata": null,
"file_urls": {}
}
]
}
{
"status": {
"success": false,
"errorMessage": "The parent node doesn't belong to the root"
}
}
POST
https://api.gmetri.com/sdk/file/getRootFileId
Get root file by root name
{
"status": {
"success": true
},
"data": {
"file": {
"id": 438477
}
}
}
{
"status": {
"success": false,
"errorMessage": "No root file found"
}
}
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|