# 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.

  1. On the client machine, open apicontroller.xml located in the Components directory, which is by default in /var/opt/openit/etc/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">/home/localmappings</Value>
    5031|    </Object>
  3. Save the file.

  4. Go to the bin directory, which is by default in /opt/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /opt/openit/bin
  5. Update the configuration file, run the command:

    Command Syntax
    ./openit_confbuilder --client

The files from the client will be uploaded to the server in $ROOT_DATA_DIR/misc.

  1. On the client machine, open apicontroller.xml located in the Components directory, which is by default in /usr/local/openit/etc/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">/home/localmappings</Value>
    5031|    </Object>
  3. Save the file.

  4. Go to the bin directory, which is by default in /usr/local/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /usr/local/openit/bin
  5. Update the configuration file, run the command:

    Command Syntax
    ./openit_confbuilder --client

The files from the client will be uploaded to the server in $ROOT_DATA_DIR/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
     openit_confbuilder.exe --client
    
  1. On the client machine, open apicontroller.xml in the Components directory, which is by default in /var/opt/openit/etc/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. Go to the bin directory, which is by default in /opt/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /opt/openit/bin
  5. Update the configuration file, run the command:

    Command
    openit_confbuilder --client
  1. On the client machine, open apicontroller.xml in the Components directory, which is by default in /usr/local/openit/etc/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. Go to the bin directory, which is by default in /usr/local/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /usr/local/openit/bin
  5. Update the configuration file, run the command:

    Command
    ./openit_confbuilder --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. Go to the scheduler directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\scheduler, and open transfer_misc_files.oconf.

  2. Locate and set root.scheduler.jobs.transfer_misc_files.general.active to true to activate the sending of miscellaneous files.

    transfer_misc_files.oconf
    13|	}
    14|		general
    15|		{
    16|			active
    17|			{
    18|				type=bool
    19|				value=true
  3. Save the changes.

  1. Go to the scheduler directory, which is by default in /var/opt/openit/etc/scheduler, and open transfer_misc_files.oconf.

  2. Locate and set root.scheduler.jobs.transfer_misc_files.general.active to true to activate the sending of miscellaneous files.

    transfer_misc_files.oconf
    13|	}
    14|		general
    15|		{
    16|			active
    17|			{
    18|				type=bool
    19|				value=true
  3. Save the changes.

  1. Go to the scheduler directory, which is by default in /usr/local/openit/etc/scheduler, and open transfer_misc_files.oconf.

  2. Locate and set root.scheduler.jobs.transfer_misc_files.general.active to true to activate the sending of miscellaneous files.

    transfer_misc_files.oconf
    13|	}
    14|		general
    15|		{
    16|			active
    17|			{
    18|				type=bool
    19|				value=true
  3. Save the changes.

# 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
    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.

  1. Go to the bin directory, which is by default in /opt/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /opt/openit/bin
  2. Run the following command:

    Command
    openit_apicontroller -t upload_misc
  3. Check that the files from the client are uploaded to the server in $ROOT_DATA_DIR\misc.

  1. Go to the bin directory, which is by default in /usr/local/openit/bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd /usr/local/openit/bin
  2. Run the following command:

    Command
    openit_apicontroller -t upload_misc
  3. Check that the files from the client are uploaded to the server in $ROOT_DATA_DIR\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