# Session Management (WebRTC Only)

Session Management assigns a unique session name to each WebRTC playback ("Session") and lets you manage sessions for operational convenience.

## Session Identification

By default, the server issues a UUID per WebRTC session. For operations, you can explicitly set the session name by query (`session=xxx`) via the end of the WebRTC playback URL (`ws[s]://...`).

* Example: `ws://ome-host/app/stream/playlist?session=my_session`

{% hint style="info" %}
We recommend that if you need traceability in production, you use rule-based session names.
{% endhint %}

### Duplicate Playback Prevention

If the same session name attempts to play from two or more locations at the same time, the second request is rejected. This policy prevents conflicts and misuse when the same `app/stream` is accessed from multiple places.

## Session Management API

These APIs allow you to list sessions, force-terminate sessions, and inquire session metrics.

### Sessions: List and Terminate API

You can control WebRTC playback using this API. When you identify a problematic session, call the `DELETE` API to force-stop it immediately.&#x20;For proactive access control, pair Session Management with [Admission Webhooks](https://docs.ovenmediaengine.com/access-control/admission-webhooks).

{% content-ref url="../rest-api/v1/session" %}
[session](https://ovenmediaengine-enterprise.gitbook.io/guide/features/rest-api/v1/session)
{% endcontent-ref %}

### Session Metrics API

You can retrieve real-time metrics per session, including average/peak throughput, total bytes sent, and more.

{% content-ref url="../rest-api/v1/statistics/current/session" %}
[session](https://ovenmediaengine-enterprise.gitbook.io/guide/features/rest-api/v1/statistics/current/session)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ovenmediaengine-enterprise.gitbook.io/guide/features/workflow-integration-and-external-system-connectivity/session-management-webrtc-only.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
