Update a ThingWorx AppKey for Platform Analytics – Scripted Process
When you need a new ThingWorx AppKey, use the procedure below to update and encrypt the key.
1. Log into
ThingWorx Composer, as an Administrator, and create a new AppKey. For more information, see the
Application Keys section of the
ThingWorx Help Center.
|
The Application Key you provide to ThingWorx Analytics must be a key assigned to a user with Administrator privileges. After installation, the Application Key can be reassigned to a non-administrator user who has the appropriate permissions. See ThingWorx Application Key Permission Levels.
The same key can be used for both Analytics Server and Platform Analytics.
|
2. On the Windows computer where your Platform Analytics is installed, open the Windows PowerShell, or a Command Prompt, in Administrator mode and navigate to the bin directory:
C:\Program Files\ThingWorxAnalytics\PlatformAnalytics\bin
3. Execute the following command to run a script that will update the encryption of your new AppKey:
update-encrypted-password.bat t <new AppKey>
A message is displayed when the encryption process is complete and the command prompt returns.
4. Do one of the following to restart the Platform Analytics services:
◦ From the installation bin directory, run the following commands: .\twpas.bat stop and then .\twpas.bat start.
◦ From the Windows Start menu, navigate to PlatformAnalytics, right-click on the Restart option, and select Run As Administrator.
It might take several seconds for the Things in ThingWorx to refresh and reconnect.