> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 스트림 연결

> Stream Connections 엔드포인트를 통해 애플리케이션의 스트리밍 기록을 조회할 수 있습니다. connections를 다루는 X API v2 표준 계층에 대한 참고 자료입니다.

Stream Connections 엔드포인트를 사용하면 애플리케이션의 스트리밍 연결 기록을 조회하고 활성 또는 여러 연결을 종료할 수 있습니다. 이를 통해 연결 상태를 모니터링하고, 중복 연결과 같은 문제를 해결하며, Filtered Stream 및 Sampled Stream과 같은 엔드포인트의 스트리밍 세션을 관리할 수 있습니다.

<Note>
  이 엔드포인트는 [Bearer Token 인증](/fundamentals/authentication/oauth-2-0/application-only)이 필요하며 스트리밍 엔드포인트에 액세스할 수 있는 앱에서 사용할 수 있습니다.
</Note>

## 개요

<CardGroup cols={2}>
  <Card title="연결 기록" icon="history">
    활성 및 과거 연결 보기
  </Card>

  <Card title="전체 종료" icon="power-off">
    모든 활성 스트리밍 연결 종료
  </Card>

  <Card title="엔드포인트별 종료" icon="https://mintcdn.com/x-preview/szd6PKNMlRQoyyAo/icons/xds/icon-filter.svg?fit=max&auto=format&n=szd6PKNMlRQoyyAo&q=85&s=5d59aff402c1f2aeae0e9e44bb23400e" width="24" height="24" data-path="icons/xds/icon-filter.svg">
    특정 스트림에 대한 연결 중지
  </Card>

  <Card title="여러 연결 종료" icon="list-check">
    UUID로 특정 연결 종료
  </Card>
</CardGroup>

***

## 엔드포인트

| Method | Endpoint                                                                               | 설명                   |
| :----- | :------------------------------------------------------------------------------------- | :------------------- |
| GET    | [`/2/connections`](/x-api/connections/get-connection-history)                          | 활성 및 이력 스트리밍 연결 가져오기 |
| DELETE | [`/2/connections/all`](/x-api/connections/terminate-all-connections)                   | 모든 활성 연결 종료          |
| DELETE | [`/2/connections/{endpoint_id}`](/x-api/connections/terminate-connections-by-endpoint) | 특정 엔드포인트의 연결 종료      |
| DELETE | [`/2/connections`](/x-api/connections/terminate-multiple-connections)                  | UUID로 여러 연결 종료       |

***

## 사용 사례

* **연결 해제 문제 해결** — 기록을 확인하여 문제 진단 ([연결 해제 처리 참조](/x-api/fundamentals/handling-disconnections))
* **연결 제한 적용** — 중복 또는 초과 연결 종료
* **세션 정리** — 유지 관리 또는 재배포 전 모든 스트림 중지
* **사용량 모니터링** — filtered\_stream, sample\_stream과 같은 엔드포인트 전반의 연결 패턴 추적

***

## 시작하기

<Note>
  **사전 요구 사항**

  * 승인된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 스트리밍 액세스가 있는 개발자 콘솔의 [Project 및 App](/fundamentals/developer-apps)
  * App의 [Bearer Token](/fundamentals/authentication/oauth-2-0/application-only)
</Note>

<CardGroup cols={2}>
  <Card title="API 참조" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/connections/get-connection-history" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>

  <Card title="스트리밍 기본" icon="stream" href="/x-api/fundamentals/consuming-streaming-data">
    스트리밍에 대해 알아보기
  </Card>
</CardGroup>
