GET /banlist
Ponto final: GET /v1/pdapi/banlist
Autenticação: Token do portador
Permissão: REST.Banlist.Read
Objetivo
Lê registros de banimentos da lista de banimentos. Os dados relacionados ao banimento são armazenados em Banlist.json, não em Config.json.
Parâmetros de caminho
Nenhum.
Parâmetros de consulta
active:true,falseou1para filtrar o estado ativo.entryType: Filtrar por tipo de entrada de banimento.userId: Filtre por ID do usuário.ipouuserIP: Filtre por endereço IP.issuerType,issuerName,issuerIP: Filtre por metadados do emissor.reason: Filtrar por texto de motivo.q: Pesquisa geral de texto.
Solicitar corpo
Nenhum corpo de solicitação.
Esquema de resposta
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. |
Respostas de erro
Os corpos de erro usam esta forma:
| HTTP | Código de erro | Quando isso acontece |
|---|---|---|
401 |
INVALID_TOKEN |
O cabeçalho Authorization está ausente, malformado ou não corresponde a um token de portador configurado. |
403 |
MISSING_PERMISSION |
O token é válido, mas não inclui essa permissão de endpoint. |
Exemplos
Listar todos os registros de banimento
Encontre registros ativos de um usuário Steam
Pesquisar registros por IP
Cenários
- Verifique se um jogador ou IP está banido no momento.
- Pesquise por motivo ou emissor antes de cancelar o banimento.
- Crie um painel de moderação que leia de
Banlist.jsonaté API.