IBM Support

How to View Planning Analytics Database User Sessions

Troubleshooting


Problem

The purpose of this document is to provide steps one can follow to understand which users are active in a Planning Analytics database.

Resolving The Problem

It is possible to list the users logged in to the Planning Analytics database using the REST API.  If not already familiar,  please review the following before you proceed: How to Connect to Planning Analytics as a Service Database using REST API
 
  • To retrieve a list of active user sessions, issue the following GET request:
    • {{pahost}}/api/{{tenant}}/v0/tm1/{{tm1db}}/api/v1/Sessions?$expand=User
  • The response will contain all open user sessions.  Example:
    • {
          "@odata.context": "$metadata#Sessions(User)",
          "value": [
              {
                  "ID": 7253997742214112650,
                  "Context": "Workspace",
                  "Active": true,
                  "User": {
                      "Name": "username.one@domain.com",
                      "FriendlyName": "username.one@domain.com",
                      "Type": "Admin",
                      "IsActive": true
                  }
              },
              {
                  "ID": 8368024659544922548,
                  "Context": "",
                  "Active": true,
                  "User": {
                      "Name": "username.two@domain.com",
                      "FriendlyName": "username.two@domain.com",
                      "Type": "Admin",
                      "IsActive": true
                  }
              }
          ]
      }
A user session may exist and not be actively running anything on the Planning Analytics database.  To get a better understanding of what is running on the Planning Analytics database, we should be looking at the Jobs endpoint instead.  
 
  • To retrieve a list of jobs, issue the following GET request:
    • {{pahost}}/api/{{tenant}}/v0/tm1/{{tm1db}}/api/v1/Jobs?$expand=*
  • The response will contain all jobs running on the database.  Example:
    • {
          "@odata.context": "$metadata#Jobs(WaitingOn,Session,Replica)",
          "value": [
              {
                  "ID": "a984c142-5948-42c7-9cd6-6a79b265c83c-00",
                  "Description": "POST /ExecuteMDX",
                  "State": "Running",
                  "ElapsedTime": "P0DT00H01M04S",
                  "WaitTime": "P0DT00H00M00S",
                  "WaitingOn": [],
                  "Session": {
                      "ID": 8368024659544922548,
                      "Context": "",
                      "Active": true
                  },
                  "Replica": {
                      "ID": "0",
                      "Fingerprint": "87591d6f95c9363683b4ece9f41cd5ea",
                      "State": "ready",
                      "Commit": "2024020915080700000",
                      "Role": "Leader"
                  }
              }
          ]
      }
  • Running Jobs can also be found in the Planning Analytics Database Administration UI:
    • image-20240209110925-1

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEAI8G","label":"Planning Analytics as a Service"},"ARM Category":[{"code":"a8m3p000000GoaGAAS","label":"Planning Analytics-\u003EPlanning Analytics as a Service Specific"}],"ARM Case Number":"TS015187512","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
09 February 2024

UID

ibm17116412