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.
03-23-2021 10:57 AM
Hello,
I'm having some problem to use the REST API to set an axis command: for instance the power on.
I tried to set the axis limit and it works but I'n not able to set any axis command. Maybe I use the wrong commands
I'm using Postman to set the API command ( below you have the screenshot of the succesfull command and unsuccesfull one )
Could you help me ?
Many Thanks
Giuseppe
Solved! Go to Solution.
03-23-2021 03:16 PM
The path you try to command to must be the command itself and also the payload has to look different.
Path:
POST https://localhost:8443/automation/api/v1.0/motion/axs/AxisX/cmd/power
Payload:
{"value":true,"type":"bool8"}
There is an how to use the REST API in the blog area. Please have a look there for further hints.
Also the documentation of the ctrlX Data Layer will be improved with the new release RM21.03 ( version 1.8).
03-25-2021 09:39 AM
Hello,
I tried the power command with your advice and then I modify it as in the attached screenshot ( I set it like the limit command which is working ) but in both cases I got the same error ( see attached screenshot )
What Am I doing wrong ?
Thanks
Giuseppe
03-25-2021 10:14 AM
You are using a PUT command but as I mentioned in my instructions above you have to do a POST.
And please beware that you will always have to send an actual valid bearer token in the authorization header.
03-25-2021 03:30 PM
Hello,
Ok sorry, now it's working.
Many Thanks
Giuseppe