[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: PAS - Pick up new r-code

  • Thread starter Thread starter Irfan
  • Start date Start date
Status
Not open for further replies.
I

Irfan

Guest
Hi David, I am not sure why you see different results in REST API. This is what I did to get the agent-id curl localhost:9810/.../agents -u tomcat:tomcat { "errmsg": "", "operation": "GET AGENTS", "outcome": "SUCCESS", "result": { "agents": [ { "agentId": "vehESXrsQTKWT2REvf9mjw", "pid": "29121", "state": "AVAILABLE" } ] }, "versionNo": 1, "versionStr": "v11.7.2 ( 2017-09-24 )" } Then used the below API to terminatefreeABLSessions. Notice that the API does not have 'agents' in the URI curl localhost:9810/.../sessions -u tomcat:tomcat -X DELETE -H 'Content-type: application/vnd.progress+json' { "errmsg": "", "operation": "TERMINATE SESSIONS", "outcome": "SUCCESS", "result": 2, "versionNo": 1, "versionStr": "v11.7.2 ( 2017-19-24 )" } Now if I check the sessions in the agent, I should see the status as terminated. curl localhost:9810/.../sessions -u tomcat:tomcat -H 'Content-type: application/vnd.progress+json' { "versionStr": "v12.0.0 ( 2017-12-01 )", "versionNo": 1, "outcome": "SUCCESS", "errmsg": "", "operation": "", "result": { "AgentSession": [ { "SessionId": 4, "SessionState": "TERMINATED", "StartTime": "2017-12-13T19:58:43.798", "EndTime": "2017-12-13T20:09:26.457", "ThreadId": -1, "ConnectiondId": null, "SessionExternalState": 0, "SessionMemory": 230511 }, { "SessionId": 7, "SessionState": "TERMINATED", "StartTime": "2017-12-13T19:58:43.798", "EndTime": "2017-12-13T20:09:26.457", "ThreadId": -1, "ConnectiondId": null, "SessionExternalState": 0, "SessionMemory": 230512 } ] } } You should see same results with JMX. The only thing that changes between JMX and REST is the way we call it, other than that the functionality and the response is same.

Continue reading...
 
Status
Not open for further replies.
Back
Top