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

Show last authors
1 (% class="box" %)
2 (((Table of Contents)))
3 {{toc/}}
4
5 Allows editing and creating directories in file storage.
6 = Description =
7 **(% class="green mark" %)GET(%%)**//**  /file_storage/modify_directory.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY**&****action**=action//
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:
13 (((
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
16 )))
17
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
28 (((
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
36 (((
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
41 (((
42 * NEW
43 * MOVE
44 )))
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
46
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**(%%)".
51
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.
71
72 = Example calls =
73 **create new directory**
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
76 **set new name**
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
79 **move directory**
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