These steps allows you to install the TESAPI initial service and the TESIMPORT program.
Requirements
- Working TES
- Internet access to download the tes updates
- MyUpdates/tes folder
Install Files
- Check that the files are not already installed
ls -l /opt/datatex/tes/tesapi/
- DO NOT OVERWRITE THE FILES IF THEY ARE ALREADY THERE.
cd /root/MyUpdates/tes
tar xvjf tesapi.tar.bz2 -C /opt/datatex/tes
- Copy the latest server that is available and enable the MyAccount Updates.
cp /root/MyUpdates/tes/tesapiserver_1.0.0.6 /opt/datatex/tes/tesapi/tesapiserver
Configuration
/opt/datatex/tes/tesapi/tesapiserver.ini
- Make sure the DB and login details are configured.
[DATABASE]
HOST=127.0.0.1
PATH=/opt/datatex/tes/DB/tes.dbf
USER=tes
PASSWORD=testicle
- Start the API server to setup the DB.
cd /opt/datatex/tes/tesapi
./starttesapiserver
- Check the logs that the updates worked.
less /opt/datatex/tes/tesai/logs/20230720.log
Setup API Key
- Run the update script
cd /opt/datatex/tes/tesimport
bash ./setupapikey.sh
- Copy the “key” value from the result:
{ "funcname" : "key/update", "key" : "47F74B02-FCC9-403F-8727-FDBE4275F010", "keyname" : "47F74B02-FCC9-403F-8727-FDBE4275F010", "msg" : "Master key was created successfully", "msgcode" : 200, "name" : "", "updatekey" : "" }
- Update the tesuserimport.ini
vi /opt/datatex/tes/tesimort/tesuserimort.ini
- Set the GUIDKEY to the KEY value copied.
GUIDKEY=47F74B02-FCC9-403F-8727-FDBE4275F010
- Set the Default Company and Branch values:
COMPANY=COMPANYNAME
DEFAULTBRANCH=BRANCHNAME