Description

Refresh Agents terminates all sessions within an ABL application, thereby refreshing the multi-session agent or agents so that changes to the application can be picked-up by the agent or agents.

For more details, refer to Refresh agents in an ABL application.

Note that you identify the specific agent by the agentID, which you can obtain by executing /oemanager/applications/ABL_app_name/agents, or you can enter all in place of an agent ID to refresh all sessions in all agents in the ABL application.

HTTP Operation

DELETE

URI

//host_name:port/oemanager/applications/App_name/agents/{agentID|all}/sessions

Media type

application/vnd.progress+json

Response codes

200 Success
403 Access Denied
500 Unexpected Server Error

Command-line example

Refresh agents command to terminate sessions in all agents using the all endpoint:

curl -X DELETE -v
http://localhost:8810/oemanager/applications/oepas1/agents/all/sessions -u username:password -H "accept: */*"

Refresh agent command to terminate sessions in a specified agent using an agent with the agent ID LdS8phtPR0GIrhRrrSL3Xg:

curl -X DELETE -v
http://localhost:8810/oemanager/applications/oepas1/agents/LdS8phtPR0GIrhRrrSL3Xg/sessions -u username:password -H "accept: */*"

ABL HTTP client example

define variable resp as OpenEdge.Net.HTTP.IHttpResponse.

resp = OpenEdge.Net.HTTP.ClientBuilder:Build():Client
   :Execute(OpenEdge.Net.HTTP.RequestBuilder
      :Delete('http://localhost:8810/oemanager/applications/oepas1/agents/all/sessions')
      :UsingCredentials(new OpenEdge.Net.HTTP.Credentials('', 'username', 'password'))
      :Request
   ).

Request body example

NA

Response body example

{
   "operation":"REFRESH AGENTS",
   "outcome":"SUCCESS",
   "result":{
      "agents":[
         {
            "agentId":"q5NOCzTARCGpWy0eWv5rAw",
            "pid":"42636",
            "sessions":[
               {
                  "sessionId":4,
                  "terminateResult":"success"
               },
               {
                  "sessionId":7,
                  "terminateResult":"success"
               }
            ]
         }
      ]
   },
   "errmsg":"",
   "versionStr":"v12.1.0 ( 2019-08-07 )",
   "versionNo":1
}