Wiki source code of file_storage/get_overview.php

Last modified by YellowFox_RD on 2024/12/19 10:11

Hide last authors
YellowFox_RD 1.1 1 (% class="box" %)
Dominic Lippmann 2.1 2 (((Table of Contents)))
YellowFox_RD 1.1 3 {{toc/}}
4
Dominic Lippmann 2.1 5 Get the current directory structure of file storage including the files and their uuids to reference them for [[modifiy_file.php>>doc:YellowFox Remote Tracking Interface.Funktionen.Dateiablage.file_storagemodify_file\.php.WebHome]] or attach them via [[do_order>>doc:YellowFox Remote Tracking Interface.Funktionen.Aufträge und Nachrichten.do_order\.php.WebHome]] resp. [[do_message>>doc:YellowFox Remote Tracking Interface.Funktionen.Aufträge und Nachrichten.do_message\.php.WebHome]]. Furthermore you will get the current usage.
6 = Description =
7 **(% class="green mark" %)GET(%%)   **//**/file_storage/get_overview.php?company**=RTI_COMPANYKEY**&import**=RTI_IMPORTKEY//
8 = Parameters =
9 |=parameter|=description|=type|=hint|=mandatory
10 |company|RTI company key|string||yes
11 |import|RTI import key|string||yes
YellowFox_RD 1.1 12
Dominic Lippmann 2.1 13 = Return =
14 Return value is a JSON. On missing parameters you will receive "(% class="error" %)**ERROR:description**(%%)".
YellowFox_RD 1.1 15
Dominic Lippmann 2.1 16 **return example**
17 **return json**
YellowFox_RD 1.1 18 {{code language="java"}}{
19 "total_space": ?,
20 "used_space": ?,
21 "structure": {
Dominic Lippmann 2.1 22 "name": "my storage",
YellowFox_RD 1.1 23 "subfolders": [
24 {
Dominic Lippmann 2.1 25 "name": "access construction area",
YellowFox_RD 1.1 26 "subfolders": [],
27 "files": [
28 {
Dominic Lippmann 2.1 29 "name": "file1.jpg",
30 "uuid": "cf0b4a7b02d2632554ddd16e62e59d91"
31 },
YellowFox_RD 1.1 32 {
Dominic Lippmann 2.1 33 "name": "file2.gif",
34 "uuid": "2a87e89b1e06392d832a34d9c69f92b9"
35 }
YellowFox_RD 1.1 36 ]
37 },
38 ...
39 ]
40 }
41 }{{/code}}
42
Dominic Lippmann 2.1 43 |=Return value|=Description
44 |total_space|available storage space in byte without considering current usage
45 |used_space|currently used storage space in byte (attention: files from bin which are not deleted permanently will also add to this!)
46 |structure|Directory structure of file storage. A directory is defined by a name and the contained files and sub directories. Files are defined by their name and uuid.
47 Temporarly deleted files are shown in bin and not their original directory.
48 Permanently deleted files will not be shown!
YellowFox_RD 1.1 49