Hi everyone,
I’ve implemented a protocol with two buttons inside a table row — one to trigger a "start" and one to trigger a "stop" action — using an HTTP session to perform the control. My QAction
has row="true"
and correctly sets the control URL and payload, then calls CheckTrigger()
to execute the session.
However, even before clicking any button, the session appears to be executed, and I receive a 403
status code with the message: “Missing authentication.”
When I test the exact same API call in Postman (with the same headers), I receive a 200 response and the expected result.
In DataMiner, I receive the 403 immediately, before any manual button interaction.
The session is currently placed inside a group with type="poll"
.
My question:
How can I make sure the HTTP session is triggered only after a user clicks the button (and the QAction runs), instead of being polled automatically and how do I avoid the missing authentication? I want to avoid premature session executions and ensure the button clicks are the sole trigger.
So basically I fixed the part where it gets populated before the trigger. However, there's still missing authentication issue. Can you advise on how to fix that?
It depends on the API, but assuming that your API requires an authentication token, you can store the token you get from the authentication endpoint in a parameter and pass that parameter as a header in the request. It also helps to have another parameter that acts as a flag for if you are authenticated or not.
Also make sure to add a condition to any groups that require authentication to avoid timeouts due to not being authenticated.
I’m encountering an issue when executing a PUT request in my DataMiner element.
The GET requests work perfectly using the same headers and setup. However, when I perform a PUT request—even though I include the same headers (Content-Type: application/json, x-api-key, etc.) and a <Data> tag with a JSON body—I consistently receive an error related to authentication (e.g., “Missing authentication”).
This same request works fine in Postman, so I suspect the issue might be related to how DataMiner handles PUT requests internally or how the payload is being passed.
Could you please share a working example of what you mentioned. I’d appreciate any guidance or recommendations on how to troubleshoot this further within DataMiner.
Could you post a screenshot of your stream viewer? I'd like to see what exactly is being sent to the API.
The trigger you are using to trigger the session only triggers when you check it correct? And there are no other possible avenues the session is being called?