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. |
エラー応答
エラー本体は次の形状を使用します。
| HTTP | エラーコード | それが起こったとき |
|---|---|---|
401 |
INVALID_TOKEN |
Authorization ヘッダーが欠落しているか、形式が不正であるか、構成されたベアラー トークンと一致しません。 |
403 |
MISSING_PERMISSION |
トークンは有効ですが、このエンドポイント権限が含まれていません。 |
例
すべての禁止記録をリストする
Steam ユーザーのアクティブなレコードを検索する
IP でレコードを検索
シナリオ
- プレーヤーまたは IP が現在禁止されているかどうかを確認します。
- 禁止を解除する前に、理由または発行者で検索します。
Banlist.jsonから API までを読み取るモデレーション ダッシュボードを構築します。