Description

Terminate all idle ABL sessions associated with a specific agent.

Note: With the classic OpenEdge AppServer, you could trim idle sessions periodically by terminating agents, since each agent is a session. However, with PAS for OpenEdge and its multisession agent, trimming the agent could terminate both active and idle sessisons. Therefore, you should use this REST API call to trim the idle sessions for a specified agent.

HTTP Operation

DELETE

URI

//host_name:port/oemanager/applications/ABL_app_name
/agentid/sessions

Media type

Application/vnd.progress+json

Response codes

200 Success
500 Unexpected Server Error

Command-line example

curl -X DELETE -u username:password -v "http://localhost:8810/oemanager/applications/oepas1/RDGoyUUMTaaTQJbFPN7t1Q/sessions"

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:16680/oemanager/applications/oepas1/RDGoyUUMTaaTQJbFPN7t1Q/sessions')
      :UsingCredentials(new OpenEdge.Net.HTTP.Credentials('', 'username', 'password'))
      :Request
   ).

Request body example

NA

Response body examples

Success

{
   "operation":"TERMINATE SESSIONS",
   "outcome":"SUCCESS",
   "result":2,
   "errmsg":"",
   "versionStr":"v12.1.0 ( 2019-08-07 )",
   "versionNo":1
}

Failure

{
   "operation":"TERMINATE SESSIONS",
   "outcome":"FAILURE",
   "result":0,
   "errmsg":"AgentNotFound[SessionManager.terminateFreeSessions. Error! Agent not found. 
Agent Id: \"WKoQ7x5MQMKWHJoyOGp8uQ\"]:Agent",
   "versionStr":"v12.1.0 ( 2019-08-07 )",
   "versionNo":1
}