# Active Service Operations Report

LLMS index: [llms.txt](/llms.txt)

---

<div id="pslens-context-panel" class="card border-info mb-4 d-none">
  <div class="card-header bg-light text-info py-2 fw-bold d-flex align-items-center border-bottom border-info-subtle">
    <i class="bi bi-info-circle-fill me-2"></i>
    <span>Tailored Operational Context</span>
  </div>
  <div class="card-body p-0">
    <ul class="list-group list-group-flush">
      <li id="row-db" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Target Database:</strong>
        <span id="ctx-db" class="badge bg-secondary font-monospace">&mdash;</span>
      </li>
      <li id="row-type" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Context Type:</strong>
        <span id="ctx-type" class="badge bg-light text-dark border font-monospace text-uppercase">&mdash;</span>
      </li>
      <li id="row-severity" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Alert Severity:</strong>
        <span id="ctx-severity" class="badge">&mdash;</span>
      </li>
      <li id="row-time" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Triggered Time:</strong>
        <span id="ctx-time" class="text-muted small">&mdash;</span>
      </li>
      <li id="row-details" class="list-group-item py-2 d-none">
        <strong id="label-details" class="d-block mb-1">Firing Context:</strong>
        <code id="ctx-details" class="d-block p-2 bg-light border rounded small" style="white-space: pre-wrap; word-break: break-all;">&mdash;</code>
      </li>
    </ul>
  </div>
</div>

<script>
  (function() {
    const params = new URLSearchParams(window.location.search);
    const metadata = params.get('metadata');
    if (!metadata) return;

    try {
      
      const base64 = metadata.replace(/-/g, '+').replace(/_/g, '/');
      const jsonStr = decodeURIComponent(escape(window.atob(base64)));
      const data = JSON.parse(jsonStr);

      if (data) {
        let hasData = false;

        if (data.db) {
          document.getElementById('ctx-db').textContent = data.db;
          document.getElementById('row-db').classList.remove('d-none');
          hasData = true;
        }

        if (data.type) {
          document.getElementById('ctx-type').textContent = data.type;
          document.getElementById('row-type').classList.remove('d-none');
          hasData = true;
        }

        if (data.severity) {
          const severityBadge = document.getElementById('ctx-severity');
          const severity = data.severity.toLowerCase();
          severityBadge.textContent = severity.toUpperCase();
          if (severity === 'critical') {
            severityBadge.className = 'badge bg-danger';
          } else if (severity === 'warning') {
            severityBadge.className = 'badge bg-warning text-dark';
          } else {
            severityBadge.className = 'badge bg-info';
          }
          document.getElementById('row-severity').classList.remove('d-none');
          hasData = true;
        }

        if (data.t) {
          const date = new Date(data.t * 1000);
          document.getElementById('ctx-time').textContent = date.toLocaleString();
          document.getElementById('row-time').classList.remove('d-none');
          hasData = true;
        }

        if (data.details) {
          document.getElementById('ctx-details').textContent = data.details;

          
          const labelDetails = document.getElementById('label-details');
          if (data.type === 'object') {
            labelDetails.textContent = 'Object Metadata Details:';
          } else if (data.type === 'report') {
            labelDetails.textContent = 'Report Description:';
          } else {
            labelDetails.textContent = 'Firing Context:';
          }

          document.getElementById('row-details').classList.remove('d-none');
          hasData = true;
        }

        if (hasData) {
          document.getElementById('pslens-context-panel').classList.remove('d-none');
        }
      }
    } catch (e) {
      console.error('Failed to parse operational context metadata:', e);
    }
  })();
</script>


## Active Service Operations Report

**Report ID:** `ib-active-any-routes`
**Category:** Integration Broker

## Purpose

This report lists all fully active service operations — those with at least one active version, at least one active routing, and at least one active handler — along with their permission lists that grant access.

## What It Captures

For each fully active service operation:

- Operation metadata (service name, type, sync/async, REST method)
- Active handlers (handler name, type, application class)
- Active routings (routing name, sender node, receiver node, generated flag)
- Permission lists from PSAUTHWS that grant access to the operation

## Tables Queried

### PSAUTHWS — Web Service Authorizations

Bulk-fetched upfront to build a map of operation to permission lists.

|      Field       |         Description         |
| ---------------- | --------------------------- |
| IB_OPERATIONNAME | Service operation name      |
| CLASSID          | Permission list with access |

### PSOPERATION — Service Operation Definitions

Paginated to discover all operations.

|      Field       |            Description            |
| ---------------- | --------------------------------- |
| IB_OPERATIONNAME | Operation name (primary key)      |
| IB_SERVICENAME   | Parent service name               |
| RTNGTYPE         | Routing type (S=Sync, A=Async)    |
| IB_REST_SERVICE  | REST indicator (0=SOAP, 1/2=REST) |
| IB_RESTMETHOD    | HTTP method for REST operations   |
| DESCR            | Short description                 |

### PSOPRVERDFN — Operation Version Definitions

|    Field    |        Description        |           Filter           |
| ----------- | ------------------------- | -------------------------- |
| VERSIONNAME | Version name (e.g., "v1") |                            |
| ACTIVE_FLAG | Version active status     | At least one must be `'A'` |

### PSOPRHDLR — Operation Handlers

|    Field    |              Description              |
| ----------- | ------------------------------------- |
| HANDLERNAME | Handler name                          |
| HANDLERTYPE | Handler type (e.g., ApplicationClass) |
| ACTIVE_FLAG | Handler active status (`A` or `I`)    |

### PSOPERATIONAC — Application Class Handlers

|     Field      |       Description        |
| -------------- | ------------------------ |
| PACKAGEROOT    | Application package root |
| APPCLASSID     | Application class ID     |
| APPCLASSMETHOD | Method name              |

### PSIBRTNGDEFN — Integration Broker Routing Definitions

Fetched with EFFDT logic disabled.

|      Field       |            Description            |
| ---------------- | --------------------------------- |
| ROUTINGDEFNNAME  | Routing definition name           |
| SENDERNODENAME   | Sender node (e.g., `~~ANY~~`)     |
| RECEIVERNODENAME | Receiver node                     |
| EFF_STATUS       | Effective status (`A`=Active)     |
| GENERATED        | Whether routing is auto-generated |

## How It Runs

The report pulls all service operations with their child records (versions, handlers, routings) in a single paginated hierarchical query, then bulk-fetches `PSAUTHWS` to map each operation to its permission lists. Operations are filtered to those with at least one active version, routing, and handler before being written to the report. For a system with N service operations and A `PSAUTHWS` rows, expect roughly `N/50 + A/300` API calls. A site with 500 operations and 2000 auth rows runs in about 17 calls.

## Report Output

The generated report contains:

- **Header** with database name and generation timestamp
- **Summary** with total operations and count of active operations
- **Per-operation sections** with:
  - Operation metadata (service, type, REST method, description)
  - Active handlers table (handler name, type, app class path)
  - Active routings table (routing name, sender, receiver, generated flag)
  - Permission lists table (linked to permission list detail pages)

## Interpreting Results

- **Operations with no permission lists** may be inaccessible or may rely on other authentication mechanisms
- **Operations with `~~ANY~~` sender routings** accept messages from any external node. Review whether this is intentional
- **Operations with no active handlers** may indicate stale configuration
- **Operations with many permission lists** have broad access. Verify this is appropriate

## Use Cases

1. **IB inventory** — Get a complete list of all active service operations and their configuration
2. **Security review** — Identify which operations are accessible and by whom
3. **Cleanup** — Find operations with no active handlers or routings that may be candidates for deactivation
