Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sv translation
languageen

Allows editing and creating directories in file storage.

description

Description

GET  /file_storage/modify_directory.php?company=RTI_COMPANYKEY&import=IMPORTKEY&action=action

parameters

Parameters

ParameterDescriptionTypeNoteMandatory
companyRTI company keystring
yes
importRTI import keystring
yes
actionaction typestring

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_pathpath to directorystring

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)


namedirectory namestring

name of directory

only for action types

  • NEW (= name of new folder)
  • RENAME (= new name of folder)
(yes)
destination_pathpath 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

  • NEW
  • MOVE

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.

Return

On success you will receive "OK". On missing parameters or errors you will receive "ERROR:description".


Possible error values

ErrorDescription
MISSING_COMPANYcompany key is missing
INVALID_COMPANYCompany not found. Company key or import key might be faulty.
ERROR_MAINTENANCEYour company is under maintenance, no RTI request are possible at the moment.
MISSING_IMPORTimport key is missing
UNKNOWN_ACTIONAction type is missing or unknown.
UNKNOWN_DIRECTORYNo directory with given source path found.
CAN_NOT_MODIFY_ROOTRoot directory can not be edited.
CAN_NOT_DELETE_SYSTEM_DIRECTORIESSystem directories can not be deleted.
MISSING_NAME / MISSING_NEW_NAMENo name was given. (for action type NEW/RENAME).
NAME_SHOULD_NOT_BE_EMPTYName must not be empty string.
INVALID_DIRECTORY_NAMEName contains invalid characters. Not allowed: ~,",#,%,*,<,>,?,/,\,{,|,}
UNKNOWN_DESTINATION_PATHDestination 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_EXISTYou are trying to create a new directory, but given destination path already owns a directory with this name.
DIRECTORY_WITH_THIS_PATH_DOES_ALREADY_EXISTYou are trying to move a directory, but given destination path already owns a directory with the same name.
MOVE_FAILEDMoving directory failed.
RENAME_FAILEDRenaming directory failed.
DELETE_FAILEDDeleting directory failed.

Example calls

Code Block
titlecreate 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
titleset 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


Code Block
titlemove 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