ActiveSessions

Return active cPanel sessions

Changed on

This function returns the active cPanel sessions for the current user, so the account owner can review where their account is currently signed in and spot a session they do not recognize.

Note:

  • This function returns an array, so UAPI's generic api.filter_*, api.sort_* and api.paginate_* parameters apply, and a caller-supplied sort replaces the default ordering of the data return value.
  • Session addresses are private, so this function is unavailable to demo (shared) accounts.
get/ActiveSessions/list_active_sessions

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "list_active_sessions",
  "module": "ActiveSessions",
  "result": {
    "data": [
      {
        "ip_address": "192.0.2.0",
        "is_current": 1,
        "last_active": 1755520392,
        "login_theme": "cpanel",
        "tfa_verified": 1
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes