Allows editing and creating directories in file storage. descriptionDescriptionGET /file_storage/modify_directory.php?company=RTI_COMPANYKEY&import=IMPORTKEY&action=action parametersParametersParameter | Description | Type | Note | Mandatory |
---|
company | RTI company key | string |
| yes | import | RTI import key | string |
| yes | action | action type | string | possible values: - NEW: create new directory
- 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
- RENAME: rename existing directory
- MOVE: move directory
- DELETE: delete directory, contained files will be moved to bin
| yes | source_path | path to directory | string | format: directory/sub directory/.../affected directory (slash-separated) Root does not have to be specified. To move the file to root directory, just leave the param empty. Paths are case insensitive. nicht relevant bei Aktionstyp NEW | (yes)
| name | directory name | string | name of directory only for action types - NEW (= name of new folder)
- RENAME (= new name of folder)
| (yes) | destination_path | path to directory |
| format: directory/sub directory/.../affected directory (slash-separated) Root does not have to be specified. To move the file to root directory, just leave the param empty. Paths are case insensitive. only for action types - NEW (= path to parent directory )
- MOVE (=path to new parent directory)
| (yes) | recursive |
| string | Flag if given destination_path has to exist. Relevant for action types 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 |
System directories can not be removed. Root can not be renamed. ReturnOn success you will receive "OK". On missing parameters or errors you will receive "ERROR:description".
Possible error valuesError | Description |
---|
MISSING_COMPANY | company key is missing | INVALID_COMPANY | Company not found. Company key or import key might be faulty. | ERROR_MAINTENANCE | Your company is under maintenance, no RTI request are possible at the moment. | MISSING_IMPORT | import key is missing | UNKNOWN_ACTION | Action type is missing or unknown. | UNKNOWN_DIRECTORY | No directory with given source path found. | CAN_NOT_MODIFY_ROOT | Root directory can not be edited. | CAN_NOT_DELETE_SYSTEM_DIRECTORIES | System directories can not be deleted. | MISSING_NAME / MISSING_NEW_NAME | No name was given. (for action type NEW/RENAME). | NAME_SHOULD_NOT_BE_EMPTY | Name must not be empty string. | INVALID_DIRECTORY_NAME | Name contains invalid characters. Not allowed: ~,",#,%,*,<,>,?,/,\,{,|,} | 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. | DIRECTORY_DOES_ALREADY_EXIST | You are trying to create a new directory, but given destination path already owns a directory with this name. | 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. | MOVE_FAILED | Moving directory failed. | RENAME_FAILED | Renaming directory failed. | DELETE_FAILED | Deleting directory failed. |
Example calls Code Block |
---|
title | create new directory |
---|
| https://map.yellowfox.de/rti/file_storage/modify_directory.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&action=NEW&destination_path=Bilder&name=Fotos |
Code Block |
---|
| 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 Block |
---|
| 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 |
|