コンテンツにスキップ

GET /banlist

エンドポイント: GET /v1/pdapi/banlist

認証: ベアラートークン

許可: REST.Banlist.Read

目的

禁止リストから禁止レコードを読み取ります。禁止関連のデータは、Config.json ではなく、Banlist.json に保存されます。

パスパラメータ

なし。

クエリパラメータ

  • active: アクティブ状態をフィルタリングするための true、false、または 1。
  • entryType: 禁止エントリ タイプでフィルタリングします。
  • userId: ユーザー ID でフィルターします。
  • ip または userIP: IP アドレスでフィルターします。
  • issuerType、issuerName、issuerIP: 発行者のメタデータでフィルターします。
  • reason: 理由テキストでフィルターします。
  • q: 一般的なテキスト検索。

リクエストボディ

リクエスト本文がありません。

応答スキーマ

200 response schema

Field Type Description
Banlist object Banlist data after applying query filters.

Banlist object schema:

Field Type Description
Version integer Banlist file format version.
BannedMessage string Message shown to banned players.
UserEntries object[] User ban entries that match the supplied filters.
IPEntries object[] IP ban entries that match the supplied filters.

UserEntries[] item schema:

Field Type Description
UserId string Banned user ID.
Active boolean Whether the ban is currently active.
BannedBy object Issuer data for the ban action.
UnbannedBy object Issuer data for the unban action, when present.

IPEntries[] item schema:

Field Type Description
IP string Banned IP address.
Active boolean Whether the ban is currently active.
BannedBy object Issuer data for the ban action.
UnbannedBy object Issuer data for the unban action, when present.

Issuer object schema:

Field Type Description
Type string Issuer type, such as rest, player, or system.
NameValue string Issuer name, user ID, token, or type fallback.
IP string Issuer IP address metadata.
Reason string Reason recorded for the action.
Timestamp object UTC timestamp components for the action.

Timestamp object schema:

Field Type Description
UTC integer Unix timestamp in seconds.
Year integer UTC year.
Month integer UTC month.
Day integer UTC day of month.
Hour integer UTC hour.
Min integer UTC minute.
Sec integer UTC second.
Msec integer Millisecond component.

エラー応答

エラー本体は次の形状を使用します。

{
    "Error": {
        "Code": "ERROR_CODE",
        "Message": "Human-readable message",
        "Details": {}
    }
}
HTTP エラーコード それが起こったとき
401 INVALID_TOKEN Authorization ヘッダーが欠落しているか、形式が不正であるか、構成されたベアラー トークンと一致しません。
403 MISSING_PERMISSION トークンは有効ですが、このエンドポイント権限が含まれていません。

例

すべての禁止記録をリストする

GET /v1/pdapi/banlist

Steam ユーザーのアクティブなレコードを検索する

GET /v1/pdapi/banlist?active=true&userId=steam_76561198012345678

IP でレコードを検索

GET /v1/pdapi/banlist?ip=203.0.113.42

シナリオ

  • プレーヤーまたは IP が現在禁止されているかどうかを確認します。
  • 禁止を解除する前に、理由または発行者で検索します。
  • Banlist.json から API までを読み取るモデレーション ダッシュボードを構築します。

関連