#
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:
On the client machine, open
apicontroller.xml
in the Components directory, which is by default inC:\Program Files\OpeniT\Core\Configuration\Components
.Locate object node
upload_misc
and set the value of its subobject nodedir
to the path of the directory containing the miscellaneous files.apicontroller.xml5014| <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.xml5014| <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>
Save the file.
Open a command prompt with Administrator level privileges.
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\OpeniT\Core\bin
Update the configuration file, run the command:
Command Syntaxopenit_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
.
On the client machine, open
apicontroller.xml
located in the Components directory, which is by default in/var/opt/openit/etc/Components
.Locate object node
upload_misc
and set the value of its subobject nodedir
to the path of the directory containing the miscellaneous files.apicontroller.xml5014| <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.xml5014| <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>
Save the file.
Go to the bin directory, which is by default in
/opt/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /opt/openit/bin
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
.
On the client machine, open
apicontroller.xml
located in the Components directory, which is by default in/usr/local/openit/etc/Components
.Locate object node
upload_misc
and set the value of its subobject nodedir
to the path of the directory containing the miscellaneous files.apicontroller.xml5014| <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.xml5014| <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>
Save the file.
Go to the bin directory, which is by default in
/usr/local/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /usr/local/openit/bin
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:
On the client machine, open
apicontroller.xml
in the Components directory, which is by default inC:\Program Files\OpeniT\Core\Configuration\Components
.Locate object node
upload_misc
and make sure the value of its subobject nodekeep_data
is true.apicontroller.xml5014| <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>
Save the changes.
Open a command prompt with Administrator level privileges.
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\OpeniT\Core\bin
Update the configuration file, run the command:
Commandopenit_confbuilder.exe --client
On the client machine, open
apicontroller.xml
in the Components directory, which is by default in/var/opt/openit/etc/Components
.Locate object node
upload_misc
and make sure the value of its subobject nodekeep_data
is true.apicontroller.xml5014| <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>
Save the changes.
Go to the bin directory, which is by default in
/opt/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /opt/openit/bin
Update the configuration file, run the command:
Commandopenit_confbuilder --client
On the client machine, open
apicontroller.xml
in the Components directory, which is by default in/usr/local/openit/etc/Components
.Locate object node
upload_misc
and make sure the value of its subobject nodekeep_data
is true.apicontroller.xml5014| <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>
Save the changes.
Go to the bin directory, which is by default in
/usr/local/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /usr/local/openit/bin
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:
Go to the scheduler directory, which is by default in
C:\Program Files\OpeniT\Core\Configuration\scheduler
, and opentransfer_misc_files.oconf
.Locate and set
root.scheduler.jobs.transfer_misc_files.general.active
to true to activate the sending of miscellaneous files.transfer_misc_files.oconf13| } 14| general 15| { 16| active 17| { 18| type=bool 19| value=true
Save the changes.
Go to the scheduler directory, which is by default in
/var/opt/openit/etc/scheduler
, and opentransfer_misc_files.oconf
.Locate and set
root.scheduler.jobs.transfer_misc_files.general.active
to true to activate the sending of miscellaneous files.transfer_misc_files.oconf13| } 14| general 15| { 16| active 17| { 18| type=bool 19| value=true
Save the changes.
Go to the scheduler directory, which is by default in
/usr/local/openit/etc/scheduler
, and opentransfer_misc_files.oconf
.Locate and set
root.scheduler.jobs.transfer_misc_files.general.active
to true to activate the sending of miscellaneous files.transfer_misc_files.oconf13| } 14| general 15| { 16| active 17| { 18| type=bool 19| value=true
Save the changes.
#
Force Send Client Files to Server
After configuring the APIController, you can force the client to send files to the server:
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\OpeniT\Core\bin
Run the following command:
Commandopenit_apicontroller.exe -t upload_misc
Check that the files from the client are uploaded to the server in
$ROOT_DATA_DIR\misc
, which is by default inC:\ProgramData\OpeniT\Data\misc
.
Go to the bin directory, which is by default in
/opt/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /opt/openit/bin
Run the following command:
Commandopenit_apicontroller -t upload_misc
Check that the files from the client are uploaded to the server in
$ROOT_DATA_DIR\misc
.
Go to the bin directory, which is by default in
/usr/local/openit/bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd /usr/local/openit/bin
Run the following command:
Commandopenit_apicontroller -t upload_misc
Check that the files from the client are uploaded to the server in
$ROOT_DATA_DIR\misc
.