Is there a way I can automate the KepwareServer ex enable API configuration setting during install OR after silent install is complete ?. If there is a config file then I can write a script to update that setting and enable the Kepware API connection.
We have around 200 Kepware server's that we have to setup via automated scripts. It will be a very time taking job to use the UI to set the configuration API setting to Yes to all the serves Just to enable the config automation.
Solved! Go to Solution.
Hello!
Thanks for this question. My colleagues offer some thoughts below however what you're looking for is actually possible today with existing functionality. I am not sure this is covered in training courses so I wanted to make sure to comment here. Also, please in the future feel free to engage the Kepware Solutions Consulting team directly about questions like this by writing to presales.support@kepware.com, or opening a support ticket and marking the case as Presales.
After installation, you can enable the Configuration API by editing "settings.ini" within C:\ProgramData\PTC\ThingWorx Kepware Server\V6 directory. If using a Kepware-branded product (KEPServerEX), the directory is \Kepware\KEPServerEX\V6. You can edit the following entries to enable / configure the API:
[Config API Service]
AllowInsecureCommunications = 1
CORSOrigins =
Enabled = 1
EnableDocumentation = 1
Port = 57412
SSLPort = 57512
SSLProtocolVersion = 4
VerboseTransactionLogging = 0
You can of course edit this file using any scripting environment that supports file manipulation. I would recommend the following workflow for your script:
1- call the Service Control Manager to stop the Kepware runtime service
2- edit settings.ini
3- call the Service Control Manager to start the Kepware runtime service
Please feel free to post here or write into presales.support@kepware.com if any other questions.
Thanks,
Sam
The install of new configuration with a predefined project or changes to the Configuration API enablement setting cannot be done at this time and there are no current work arounds. Please put in an enhancement request to see if the Kepware developers can add the functionality to future releases. Here is a link to the Kepware knowledge base article that covers how to submit an enhancement request:
https://www.ptc.com/en/support/article/CS295047
Thanks,
*Chris
We cover this in PTCU LEANR Kepware server course : https://learningconnector.ptc.com/course/99/kepware-fundamentals-of-the-kepware-server-application.
And if you are really good, I will demonstrate it using ThingWorx.
Hello!
Thanks for this question. My colleagues offer some thoughts below however what you're looking for is actually possible today with existing functionality. I am not sure this is covered in training courses so I wanted to make sure to comment here. Also, please in the future feel free to engage the Kepware Solutions Consulting team directly about questions like this by writing to presales.support@kepware.com, or opening a support ticket and marking the case as Presales.
After installation, you can enable the Configuration API by editing "settings.ini" within C:\ProgramData\PTC\ThingWorx Kepware Server\V6 directory. If using a Kepware-branded product (KEPServerEX), the directory is \Kepware\KEPServerEX\V6. You can edit the following entries to enable / configure the API:
[Config API Service]
AllowInsecureCommunications = 1
CORSOrigins =
Enabled = 1
EnableDocumentation = 1
Port = 57412
SSLPort = 57512
SSLProtocolVersion = 4
VerboseTransactionLogging = 0
You can of course edit this file using any scripting environment that supports file manipulation. I would recommend the following workflow for your script:
1- call the Service Control Manager to stop the Kepware runtime service
2- edit settings.ini
3- call the Service Control Manager to start the Kepware runtime service
Please feel free to post here or write into presales.support@kepware.com if any other questions.
Thanks,
Sam
This is what I ended up doing. Thanks for the reply