I'm trying to set up a websocket. That succeeds, but when I send requests to subscribe to parameters it fails with a message NotAuthorizedException.
In Cube I can access the element and the parameter.
Am I missing a step to do the subscription?
Hello Jeroen,
When you establish a connection to the WebSocket, such as through Postman, you won't be authenticated to the WebAPI. To authenticate, you'll need to send a 'SetConnectionID' message, which utilizes a 'connectionID' obtained from a prior POST request, similar to how you would authenticate to a Dashboard or LCA.
Hope this helps!
nevermind, I added “tableIndex”, and then it worked!
🙂
I did the SetConnectionID, which returned ‘1’
Then I did a GetParameter
{
“ClientSubscriptionID”: 1,
“Method”: “GetParameter”,
“Parameters”: {
“dmaID”: 822,
“elementID”: 1,
“parameterID”: 350,
“filters”: []
}
}
Then I got following reply:
{
“__type”: “Skyline.DataMiner.Web.v1.WebSockets.WebSocketServerMessage”,
“Data”: {
“__type”: “Skyline.DataMiner.Web.Common.v1.WebSocketError”,
“Message”: “Parameter u0027tableIndexu0027 is not defined.”,
“StackTrace”: null,
“ExceptionType”: “WebApiException”
},
“Type”: “WebSocketError”,
“ClientSubscriptionID”: 1
}
I checked, and parameter 350 exists on that element