Description

Get session metrics (single session or multiple sessions) for an agent of an ABL application.

HTTP Operation

GET

URI

For multiple sessions:

//host_name:port/oemanager/applications/ABL_app_name/agents/agentPID/sessions

For a single session:

//host_name:port/oemanager/applications/ABL_app_name/agents/agentPID/sessions?sessionID={sessionID}
Note: Agent PID (for example, 1144) or agent ID (for example, W9UI_6dJQ-qSsk-o25mWAw) can be used to identify the multi-session agent. Both values can be obtained using the List agents API.

Media type

application/vnd.progress+json

Response codes

200 Success
500 Unexpected Server Error

Command-line example

For multiple sessions:

curl -X GET -u username:password -v http://localhost:16680/oemanager/applications/oepas1/agents/39028/sessions

For a single session:

curl -X GET -u username:password -v http://localhost:16680/oemanager/applications/oepas1/agents/39028/sessions?sessionID=7

ABL HTTP client example

For multiple sessions:

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

resp = OpenEdge.Net.HTTP.ClientBuilder:Build():Client
   :Execute(OpenEdge.Net.HTTP.RequestBuilder
      :Get('http://localhost:16680/oemanager/applications/oepas1/agents/39028/sessions')
      :UsingBasicAuthentication(new OpenEdge.Net.HTTP.Credentials('PASOE Manager Application', 'username', 'password'))
      :Request
   ).

For a single session:

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

resp = OpenEdge.Net.HTTP.ClientBuilder:Build():Client
   :Execute(OpenEdge.Net.HTTP.RequestBuilder
      :Get('http://localhost:16680/oemanager/applications/oepas1/agents/39028/sessions?sessionID=7')
      :UsingBasicAuthentication(new OpenEdge.Net.HTTP.Credentials('PASOE Manager Application', 'username', 'password'))
      :Request
   ).

Request body example

NA

Response body example

For multiple sessions:

{
   "operation":"GET AGENT SESSIONS",
   "outcome":"SUCCESS",
   "result":{
      "AgentSession":[
         {
            "SessionId":4,
            "SessionState":"IDLE",
            "StartTime":"2019-12-04T11:48:22.453",
            "EndTime":null,
            "ThreadId":-1,
            "ConnectionId":null,
            "SessionExternalState":0,
            "SessionMemory":870085
         },
         {
            "SessionId":7,
            "SessionState":"IDLE",
            "StartTime":"2019-12-04T11:48:22.453",
            "EndTime":null,
            "ThreadId":-1,
            "ConnectionId":-1,
            "SessionExternalState":0,
            "SessionMemory":10310903
         }
      ]
   },
   "errmsg":"",
   "versionStr":"v12.1.0 ( 2019-08-07 )",
   "versionNo":1
}

For a single session:

{
  "operation": "GET AGENT SESSION",
  "outcome": "SUCCESS",
  "result": {
    "AgentSession": [
      {
        "SessionId": 7,
        "SessionState": "IDLE",
        "StartTime": "2022-09-06T09:03:39.672+04:00",
        "EndTime": null,
        "ThreadId": -1,
        "ConnectionId": null,
        "SessionExternalState": 0,
        "SessionMemory": 758886
      }
    ]
  },
  "errmsg": "",
  "versionStr": "v12.5.0 ( 2022-07-19 )",
  "versionNo": 1
}