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.
07-07-2022 11:46 AM
Hello,
I'm using the Server API to export the live alarm and alarm history from WebIQ.
The API Reference manual says that the alarm.live command, for instance, doesn't require a logged in user.
However, if I try to send the alarm.live command without sending the user.login command, it gives an "access denied" message back.
On the other hand, if I send the user.login command before and then the alarm.live command, I'm able to authenticate and to access the alarms.
So, is authentication necessary for it? Or is there anything I'm doing wrong?
Thank you!
Silvia
Solved! Go to Solution.
07-13-2022 10:20 PM
I've found other cases that exhibit the same behaviour. For example, accessing item.get with request
{
"cmd": "item.get",
"id": 0,
"data": "start"
}
yields without login:
{
"cmd": "item.get",
"data": null,
"error": {
"category": "shmi:connect:api:generic",
"errc": 4,
"message": "access denied"
},
"fragmented": false,
"id": 0
}
but with login:
{
"cmd": "item.get",
"data": {
"access_group": null,
"alias": "start",
"attributes": {},
"audit": false,
"data_type": null,
"description": null,
"digits": -1,
"interval": 100,
"label": null,
"max": null,
"min": null,
"name": {
"namespace": 2,
"node": "plc/app/Application/sym/GVL_EM00_HMI/bStart_HMI_gb"
},
"prewarn_enable": false,
"prewarn_max": null,
"prewarn_min": null,
"recorder_threshold": null,
"server": "ctrlX_CORE",
"simulation": null,
"step": null,
"transform": null,
"trend_max": null,
"trend_min": null,
"unit": null,
"update_function": null,
"update_param": null,
"warn_enable": false,
"warn_max": null,
"warn_min": null
},
"error": null,
"fragmented": false,
"id": 0
}
Like alarm.live, the documentation indicates that item.get does not require user login.
BTW: There are examples where login is not required. For instance, connect.info:
I suspect the documentation just needs to be updated.
07-14-2022 08:04 AM
The "requires loggedin user" actually refers to an internal user context which is unfortunately not described in the documentation. But we will change that in the future to explain what it really means in the document.
In essence it does NOT mean that a user has to be logged in or not so currently you cannot deduct from the available information whether a login is required or not.
We apologize for the inconvenience.