FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
01-16-2023 04:10 PM
Hi,
I just wonder if there is a way to restart a ctrlX programatically (we do not have an SSH access).
I was counting on REST API to do so but did not find any suitable method for this 😢 and my reverse engineering via Shutdown/Restart buttons in GUI did not bring any solution I can populate for mu scripts.
Somebody has an idea?
rgds
Solved! Go to Solution.
01-16-2023 05:54 PM - edited 01-16-2023 05:57 PM
It is documented under tasks at the system API: TaskReboot
Looks like you can even specify a time 😁
07-06-2023 09:03 AM
Hi,
So I finally did some tests and it looks good.
API V1 - restart works like a charm
https://ctrlxIP/system/api/v1/tasks
method: POST
payload: {"action": "reboot"}
The response is like that:
{ "id": "some_id", "state": "pending", "action": "reboot", "properties": {}, "parameters": {} }
If someone wants to restart the specific snap (or in fact its service) you should try (e.g. rexroth-drive-comm):
https://ctrlXIP/package-manager/api/v1/tasks
method: POST
payload: {"action": "restart", "parameters": {"service": "rexroth-drive-comm"}}
(you can also try: stop, start)