Pular para conteúdo

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, false ou 1 para filtrar o estado ativo.
  • entryType: Filtrar por tipo de entrada de banimento.
  • userId: Filtre por ID do usuário.
  • ip ou userIP: 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:

{
    "Error": {
        "Code": "ERROR_CODE",
        "Message": "Human-readable message",
        "Details": {}
    }
}
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

GET /v1/pdapi/banlist

Encontre registros ativos de um usuário Steam

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

Pesquisar registros por IP

GET /v1/pdapi/banlist?ip=203.0.113.42

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.json até API.

Relacionado