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 Allows editing and creating directories in file storage.
6 = Description =
YellowFox_RD 1.1 7 **(% class="green mark" %)GET(%%)**//**  /file_storage/modify_directory.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY**&****action**=action//
Dominic Lippmann 2.1 8 = Parameters =
9 |=Parameter|=Description|=Type|=Note|=Mandatory
10 |company|RTI company key|string||yes
11 |import|RTI import key|string||yes
12 |action|action type|string|possible values:
YellowFox_RD 1.1 13 (((
Dominic Lippmann 2.1 14 * NEW: create new directory(((
15 * if you create a new folder that used to exist and contained items, but was deleted, this will reactivate the old folder and all its subfolders
YellowFox_RD 1.1 16 )))
17
Dominic Lippmann 2.1 18 * RENAME: rename existing directory
19 * MOVE: move directory
20 * DELETE: delete directory, contained files will be moved to bin
21 )))|yes
22 |source_path|path to directory|string|format: directory/sub directory/.../affected directory (slash-separated)
23 Root does not have to be specified. To move the file to root directory, just leave the param empty.
24 Paths are case insensitive.
25 nicht relevant bei Aktionstyp NEW|(yes)
26 |name|directory name|string|name of directory
27 only for action types
YellowFox_RD 1.1 28 (((
Dominic Lippmann 2.1 29 * NEW (= name of new folder)
30 * RENAME (= new name of folder)
31 )))|(yes)
32 |destination_path|path to directory||format: directory/sub directory/.../affected directory (slash-separated)
33 Root does not have to be specified. To move the file to root directory, just leave the param empty.
34 Paths are case insensitive.
35 only for action types
YellowFox_RD 1.1 36 (((
Dominic Lippmann 2.1 37 * NEW (= path to parent directory )
38 * MOVE (=path to new parent directory)
39 )))|(yes)
40 |recursive||string|Flag if given destination_path has to exist. Relevant for action types
YellowFox_RD 1.1 41 (((
42 * NEW
43 * MOVE
44 )))
Dominic Lippmann 2.1 45 If set to 'true', directories specified in destination path that do not exist will be created first before executing the actual action. Is false by default (this will instead lead to UNKNOWN_DESTINATION_PATH error if you try to access a non-existing path).|no
YellowFox_RD 1.1 46
Dominic Lippmann 2.1 47 System directories can not be removed.
48 Root can not be renamed.
49 = Return =
50 On success you will receive "OK". On missing parameters or errors you will receive "(% class="error" %)**ERROR:description**(%%)".
YellowFox_RD 1.1 51
Dominic Lippmann 2.1 52 == Possible error values ==
53 |=Error|=Description
54 |MISSING_COMPANY|company key is missing
55 |INVALID_COMPANY|Company not found. Company key or import key might be faulty.
56 |ERROR_MAINTENANCE|Your company is under maintenance, no RTI request are possible at the moment.
57 |MISSING_IMPORT|import key is missing
58 |UNKNOWN_ACTION|Action type is missing or unknown.
59 |UNKNOWN_DIRECTORY|No directory with given source path found.
60 |CAN_NOT_MODIFY_ROOT|Root directory can not be edited.
61 |CAN_NOT_DELETE_SYSTEM_DIRECTORIES|System directories can not be deleted.
62 |MISSING_NAME / MISSING_NEW_NAME|No name was given. (for action type NEW/RENAME).
63 |NAME_SHOULD_NOT_BE_EMPTY|Name must not be empty string.
64 |INVALID_DIRECTORY_NAME|Name contains invalid characters. Not allowed: ~,",#,%,*,<,>,?,/,\,{,~|,}
65 |UNKNOWN_DESTINATION_PATH|Destination path is unknown. If recursive flag is set, this error will not occur, since the unknown path will be created at request.
66 |DIRECTORY_DOES_ALREADY_EXIST|You are trying to create a new directory, but given destination path already owns a directory with this name.
67 |DIRECTORY_WITH_THIS_PATH_DOES_ALREADY_EXIST|You are trying to move a directory, but given destination path already owns a directory with the same name.
68 |MOVE_FAILED|Moving directory failed.
69 |RENAME_FAILED|Renaming directory failed.
70 |DELETE_FAILED|Deleting directory failed.
YellowFox_RD 1.1 71
Dominic Lippmann 2.1 72 = Example calls =
73 **create new directory**
YellowFox_RD 1.1 74 {{code language="java"}}https://map.yellowfox.de/rti/file_storage/modify_directory.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&action=NEW&destination_path=Bilder&name=Fotos{{/code}}
75
Dominic Lippmann 2.1 76 **set new name**
YellowFox_RD 1.1 77 {{code language="java"}}https://map.yellowfox.de/rti/file_storage/modify_directory.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&action=RENAME&source_path=Bilder&name=neuer name{{/code}}
78
Dominic Lippmann 2.1 79 **move directory**
YellowFox_RD 1.1 80 {{code language="java"}}https://map.yellowfox.de/rti/file_storage/modify_directory.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&action=MOVE&destination_path=Bilder,Fotos&source_path=Erinnerungen{{/code}}
81