ThingWorx WebSocket-based Edge MicroServer (WS EMS) and Lua Script Resource (LSR) > REST Web Services Supported by WS EMS > ReplaceConfiguration
The ReplaceConfiguration service allows you to replace the configuration file for the WS EMS (config.json).
The new configuration file does not take effect until you restart the WS EMS. Use the Restart service to force the changes to take effect.
Pass in a TW_INFOTABLE that contains a JSON object. This object must contain
"config" — A JSON string that is used to replace the current configuration file.
This service returns an HTTP response only. If the operation was successful, it returns HTTP 200. Otherwise, it returns an HTTP error.
Here is an example of a REST call that replaces the configuration of a WS EMS that is running on your computer, using this service: