Running into a weird state mismatch in . I have a script that needs to verify the current agent’s login status before proceeding. I’m using the REST Proxy to hit GET /api/v2/agents/states with the agent’s ID.
The agent is definitely logged in and available. I can see them in the console. But the API response is just an empty array [].
Here is the logic:
GetRESTProxy("AgentStates", "GET", "/api/v2/agents/states/{agentId}", "")
ASSIGN("statusList", REST.Response)
I’m passing the agentId correctly. I even tried adding the expanded=true query parameter. Still getting [].
If I hit the same endpoint via Postman with the same token, I get the expected state object.
Is there a scope issue with the REST Proxy token? Or is the endpoint behavior different when called from within a script context versus an external client? I’ve checked the logs and there are no auth errors. Just empty data.