> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-7cae4884.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream Connections

> The Stream Connections endpoints let you retrieve the history of your application's streaming. Reference for the X API v2 standard tier covering connections.

The Stream Connections endpoints let you retrieve the history of your application's streaming connections and terminate active or multiple connections. Use these to monitor connection status, resolve issues like duplicate connections, and manage streaming sessions for endpoints like Filtered Stream and Sampled Stream.

<Note>
  These endpoints require [Bearer Token authentication](/fundamentals/authentication/oauth-2-0/application-only) and are available for apps with access to streaming endpoints.
</Note>

## Overview

<CardGroup cols={2}>
  <Card title="Connection history" icon="history">
    View active and past connections
  </Card>

  <Card title="Terminate all" icon="power-off">
    End all active streaming connections
  </Card>

  <Card title="Terminate by endpoint" icon="filter">
    Stop connections for specific streams
  </Card>

  <Card title="Terminate multiple" icon="list-check">
    Kill specific connections by UUID
  </Card>
</CardGroup>

***

## Endpoints

| Method | Endpoint                                                                               | Description                                     |
| :----- | :------------------------------------------------------------------------------------- | :---------------------------------------------- |
| GET    | [`/2/connections`](/x-api/connections/get-connection-history)                          | Get active and historical streaming connections |
| DELETE | [`/2/connections/all`](/x-api/connections/terminate-all-connections)                   | Terminate all active connections                |
| DELETE | [`/2/connections/{endpoint_id}`](/x-api/connections/terminate-connections-by-endpoint) | Terminate connections for a specific endpoint   |
| DELETE | [`/2/connections`](/x-api/connections/terminate-multiple-connections)                  | Terminate multiple connections by UUIDs         |

***

## Use cases

* **Troubleshoot disconnections** — Check history to diagnose issues ([see handling disconnections](/x-api/fundamentals/handling-disconnections))
* **Enforce connection limits** — Terminate duplicate or excess connections
* **Clean up sessions** — Stop all streams before maintenance or redeploy
* **Monitor usage** — Track connection patterns across endpoints like filtered\_stream, sample\_stream

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/fundamentals/developer-apps) in the Developer Console with streaming access
  * Your App's [Bearer Token](/fundamentals/authentication/oauth-2-0/application-only)
</Note>

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/x-api/connections/get-connection-history">
    Full endpoint documentation
  </Card>

  <Card title="Streaming fundamentals" icon="stream" href="/x-api/fundamentals/consuming-streaming-data">
    Learn about streaming
  </Card>
</CardGroup>
