Chapter 14: OneConnect Status

Using the REST API, details about the currently logged in OneConnect users can be retrieved. The information is sent back by cOS Core in JSON format and consists of the values that might also be provided by using the cOS Core CLI "oneconnect"" command.

Sending the Request

To retrieve the OneConnect information, an HTTP GET should be sent with the following URI:

/api/oper/oneconnect

The GET has no optional parameters.

An Example JSON Reply

Below is an example of a typical JSON reply:

{
  "error":false,
  "data": [
      {
        "interface":"OneConnect",
        "status":"CONNECTED (TCP/TLS)",
        "active_sessions":"192.168.1.11 Roger",
        "remote_address":"203.0.113.50"
      },
      {
        "interface":"OneConnect",
        "status":"CONNECTED (TCP/TLS)",
        "active_sessions":"192.168.1.12 Eric",
        "remote_address":"198.51.100.103"
      }
    ]
}