#Sending Miscellaneous Files to Server

The API Controller offers the added benefit of enabling clients to transmit non-Open iT related files to the server. This feature is particularly advantageous in scenarios where clients are required to send mapping files from their local machines. Currently, clients are only allowed to send files only from a single directory to the server. While this limitation is in effect, users may need to consolidate relevant files into a specific directory for seamless transmission.

To configure sending of files to the server:

  1. On the client machine, open apicontroller.xml in the Components directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\Components.

  2. Locate object node upload_misc and set the value of its subobject node dir to the path of the directory containing the miscellaneous files.

    apicontroller.xml
    5014| <Name>upload_misc</Name> 5015| <Description>Upload miscellaneous files</Description> 5016| <SubObjects> ... 5027| <Object> 5028| <Name>dir</Name> 5029| <Description>Directory where to find upload files</Description> 5030| <Value type="DirName">/custom/path/to/misc/files</Value> 5031| </Object>
    Example: apicontroller.xml
    5014| <Name>upload_misc</Name> 5015| <Description>Upload miscellaneous files</Description> 5016| <SubObjects> ... 5027| <Object> 5028| <Name>dir</Name> 5029| <Description>Directory where to find upload files</Description> 5030| <Value type="DirName">C:\Users\OpeniT\Documents\LocalMappings</Value> 5031| </Object>
  3. Save the file.

  4. Open a command prompt with Administrator level privileges.

  5. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd C:\Program Files\OpeniT\Core\bin
  6. Update the configuration file, run the command:

    Command Syntax
    openit_confbuilder.exe --client

The files from the client will be uploaded to the server in $ROOT_DATA_DIR\misc, which is by default in C:\ProgramData\OpeniT\Data\misc.

#Retaining Client Source Files

The API Controller deletes the source files upon sending them to the server by default. However, in the case of sending miscellaneous files to the server, it is not advisable to delete the source file upon sending. Instead, it is recommended to retain the source files to ensure data integrity and avoid unintended loss.

The retention of client source files is enabled by default. If disabled, follow these instructions to enable:

  1. On the client machine, open apicontroller.xml in the Components directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\Components.

  2. Locate object node upload_misc and make sure the value of its subobject node keep_data is true.

    apicontroller.xml
    5014| <Name>upload_misc</Name> 5015| <Description>Upload miscellaneous files</Description> 5016| <SubObjects> ... 5047| <Object> 5048| <Name>keep_data</Name> 5049| <Description>Override deleting of source file</Description> 5050| <Value type="DirName">true</Value> 5051| </Object>
  3. Save the changes.

  4. Open a command prompt with Administrator level privileges.

  5. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd C:\Program Files\OpeniT\Core\bin
  6. Update the configuration file, run the command:

    Command Syntax
    openit_confbuilder.exe --client

#Enabling Scheduler to Send Files to Server

By default, this scheduler job is not enabled. If enabled, the API Controller will send the client files to the server once a day.

Follow these instructions to enable:

  1. Open a command prompt with Administrator level privileges.

  2. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd C:\Program Files\OpeniT\Core\bin
  3. Once in the directory, activate the sending of miscellaneous files, run the command:

    Command Syntax
    openit_oconfinit -u "transfer_misc_files.root.scheduler.jobs.transfer_misc_files.general.active=true"

#Force Send Client Files to Server

After configuring the APIController, you can force the client to send files to the server:

  1. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd C:\Program Files\OpeniT\Core\bin
  2. Run the following command:

    Command Syntax
    openit_apicontroller.exe -t upload_misc
  3. Check that the files from the client are uploaded to the server in $ROOT_DATA_DIR\misc, which is by default in C:\ProgramData\OpeniT\Data\misc.

    We value your feedback!

    Please take a few minutes to complete our survey and share your thoughts on your recent experience with our documentation.

    Take survey

    Close