Description

Stop a multi-session agent that belongs to an ABL application. Note that you identify the agent by the agentID, which you can obtain by executing /oemanager/applications/ABL_app_name/agents. You can specify, in milliseconds, how long the stop process must wait before stopping an agent, if the agent is currently serving a request, using the waitToFinish parameter. waitToFinish stops new requests to the agent and waits for any current requests to complete. If the current requests do not complete in the specified time, a STOP message is sent to the agent. You can also specify an additional wait time, in milliseconds, using the waitAfterStop parameter. waitAfterStop checks if the agent has indeed stopped. If the agent has not stopped, then at the end of the specified time, a KILL message is sent to the agent. In either case, if the agent finishes processing its current requests before the waitToFinish time expires, the agent will immediately shut down.
Note: Both waitToFinish and waitAfterStop are optional parameters. If you do not specify these, the agent will be stopped immediately, irrespective of whether the agent is currently idle or serving a request.

HTTP Operation

DELETE

URI

//host_name:port/oemanager/applications/ABL_app_name/agents/agentID?
waitToFinish=time-in-milliseconds&waitAfterStop=time-in-milliseconds

Media type

application/vnd.progress+json 

Response codes

200 Success
403 Access Denied
500 Unexpected Server Error

Command-line example

curl -X DELETE -v
http://localhost:16680/oemanager/applications/oepas1/agents/AG-sCIVXeFSQYmcb7RcHo10Zw?waitToFinish=
60000 -u username:password -H "Content-Type: application/vnd.progress+json" 

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/agents/AG-sCIVXeFSQYmcb7RcHo10Zw?waitToFinish=
60000')
      :UsingBasicAuthentication(new OpenEdge.Net.HTTP.Credentials('PASOE Manager Application', 'username', 'password'))
      :Request
   ).

Request body example

NA

Response body example

{
  "result": {
    "agentID": "AG-sCIVXeFSQYmcb7RcHo10Zw"
  },
  "versionStr": "v11.7.3 ( 2018-02-12 )",
  "versionNo": 1,
  "outcome":"SUCCESS",
  "errmsg":"",
  "operation": "STOP AGENT ",
  }