file_storage/modify_directory.php
Table of Contents
Allows editing and creating directories in file storage.
Description
GET /file_storage/modify_directory.php?company=RTI_COMPANYKEY&import=IMPORTKEY&action=action
Parameters
Parameter | Description | Type | Note | Mandatory |
---|---|---|---|---|
company | RTI company key | string | yes | |
import | RTI import key | string | yes | |
action | action type | string | possible values:
| 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
| (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
| (yes) | |
recursive | string | Flag if given destination_path has to exist. Relevant for action types
| no |
System directories can not be removed.
Root can not be renamed.
Return
On success you will receive "OK". On missing parameters or errors you will receive "ERROR:description".
Possible error values
Error | 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
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
set new name
https://map.yellowfox.de/rti/file_storage/modify_directory.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&action=RENAME&source_path=Bilder&name=neuer name
move directory
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