> ## 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.

# 切断の処理

> X API v2 Powerstream エンドポイントでの切断、再接続、バックフィルの処理方法。リトライ、エラーコード、ストリームの安定性に関するガイダンス付き。

このページでは、Powerstream 固有の切断処理について説明します。すべてのストリーミングエンドポイントにまたがる切断処理の包括的なガイダンスについては、[切断処理の基礎ガイド](/x-api/fundamentals/handling-disconnections)を参照してください。

## Powerstream の切断処理

切断処理のコアコンセプトは、すべてのストリーミングエンドポイントに適用されます。次の内容は基礎ガイドを参照してください:

* なぜ接続が切断されるのか
* 一般的な切断エラー
* 切断の検出
* 再接続戦略とバックオフ
* ベストプラクティス

## 失われたデータの復旧

切断が発生した場合、失われたデータを復旧する戦略については[復旧と冗長性](/x-api/fundamentals/recovery-and-redundancy)を参照してください。以下が含まれます:

* **バックフィル** — 5 分以下の切断には `backfillMinutes` パラメーターを使用します
* **リカバリ** — より長い切断(最大 24 時間)には `startTime` と `endTime` パラメーターを使用します

### Powerstream バックフィルの例

```bash theme={null}
curl 'https://api.x.com/2/powerstream?backfillMinutes=5' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Powerstream リカバリの例

```bash theme={null}
curl 'https://api.x.com/2/powerstream?startTime=2022-07-12T15:10:00Z&endTime=2022-07-12T15:20:00Z' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

***

## 次のステップ

<CardGroup cols={2}>
  <Card title="切断の処理" icon="plug" href="/x-api/fundamentals/handling-disconnections">
    切断処理の完全ガイド
  </Card>

  <Card title="復旧と冗長性" icon="https://mintcdn.com/x-preview/cfyQtgCdwk8p69aa/icons/xds/icon-shield-keyhole.svg?fit=max&auto=format&n=cfyQtgCdwk8p69aa&q=85&s=a0e05514090c8a6af232297bfb9c4055" href="/x-api/fundamentals/recovery-and-redundancy" width="24" height="24" data-path="icons/xds/icon-shield-keyhole.svg">
    失われたデータを復旧
  </Card>

  <Card title="ストリーミングデータの消費" icon="stream" href="/x-api/fundamentals/consuming-streaming-data">
    堅牢なストリーミングクライアントを構築
  </Card>
</CardGroup>
