unban_pubkeys

unban_pubkeys type data

The unban_pubkeys method will remove all currently banned pubkeys from your ban list, or specific pubkeys from a user defined list.

Arguments

StructureTypeDescription
pubkeystringthe pubkey to ban
unban_by.typestringAll to unban all pubkeys, or Few to provide a list of pubkeys to unban
unban_by.datalistA list of pubkeys to unbanned. Only required when type is Few.

Response

StructureTypeDescription
still_bannedlistList of pubkeys which remain banned. For each pubkey, the reason it was banned pubkey.reason and the type of of ban pubkey.type is also returned.
unbannedlistList of pubkeys which were unbanned. For each pubkey, the reason it was banned pubkey.reason and the type of of ban pubkey.type is also returned.
were_not_bannedlistIf using unban_by.type: Few this will return a list of pubkeys which were not banned, but had been requested to be unbanned.

📌 Examples

Command

POST unban_pubkeys
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "unban_pubkeys",
  "unban_by": {
    "type": "All"
  }
}
Show Response

Response (success)

{
  "result": {
    "still_banned": {},
    "unbanned": {
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420": {
        "type": "Manual",
        "reason": "Having comedy mistaken for malice"
      }
    },
    "were_not_banned": []
  }
}

Command

POST unban_pubkeys
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "unban_pubkeys",
  "unban_by": {
    "type": "Few",
    "data": [
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420",
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422"
    ]
  }
}
Show Response

Response (success)

{
  "result": {
    "still_banned": {
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421": {
        "type": "Manual",
        "reason": "testing"
      }
    },
    "unbanned": {
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420": {
        "type": "Manual",
        "reason": "testing"
      }
    },
    "were_not_banned": [
      "2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422"
    ]
  }
}