OX Abuse Shield (Wforce) (1.4.0)

Download OpenAPI specification:Download

License: GPL3

An API to the wforce daemon to prevent brute-force and abuse of mail systems

addBLEntry

post /?command=addBLEntry
http://doesnotexist.open-xchange.com/?command=addBLEntry

Add a blacklist entry for an IP and/or login. Note that netmask and ip parameters are mutually exclusive.

Request Body schema: application/json
expire_secs
integer
ip
string
login
string
netmask
string
reason
string

Responses

200

addBLEntry response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "expire_secs": 3600,
  • "ip": "127.0.0.1",
  • "netmask": "2001:503:ba3e::/64",
  • "reason": "Too many bad passwords"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

allow

post /?command=allow
http://doesnotexist.open-xchange.com/?command=allow

Query whether a login should be allowed

Request Body schema: application/json
attrs
object (LTAttrs)
device_id
string
login
required
string
protocol
string
Enum:"http" "imap" "pop" "smtp" "mobileapi"
pwhash
required
string
remote
required
string
tls
boolean

Responses

200

allow response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "attrs":
    {
    },
  • "login": "joe.bloggs",
  • "protocol": "http",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true,
  • "tls": true
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "msg": "string",
  • "r_attrs":
    {
    },
  • "status": 0
}

customEndpoint

post /?command=customEndpoint
http://doesnotexist.open-xchange.com/?command=customEndpoint

Extensible mechanism allows custom REST endpoints to be defined - this is an example

Request Body schema: application/json
attrs
required
object (LTAttrs)

Responses

200

custom endpoint response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "attrs": { }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "r_attrs":
    {
    },
  • "success": true
}

delBLEntry

post /?command=delBLEntry
http://doesnotexist.open-xchange.com/?command=delBLEntry

Delete a blacklist entry for an IP and/or login. Note that netmask and ip parameters are mutually exclusive.

Request Body schema: application/json
ip
string
login
string
netmask
string

Responses

200

delBLEntry response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "ip": "127.0.0.1",
  • "netmask": "2001:503:ba3e/64"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

getBL

get /?command=getBL
http://doesnotexist.open-xchange.com/?command=getBL

Get the list of all blacklisted IPs and/or Logins

Responses

200

getBL response

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "bl_entries":
    [
    ]
}

getDBStats

post /?command=getDBStats
http://doesnotexist.open-xchange.com/?command=getDBStats

Get the db stats for an IP and/or login

Request Body schema: application/json
ip
string
login
string

Responses

200

getDBStats response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "ip": "127.0.0.1"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "bl_expire": "string",
  • "bl_reason": "string",
  • "blacklisted": true,
  • "key_name": "string",
  • "stats":
    {
    }
}

ping

get /?command=ping
http://doesnotexist.open-xchange.com/?command=ping

Ping the server to ensure it is operational

Responses

200

ping response

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

report

post /?command=report
http://doesnotexist.open-xchange.com/?command=report

Creates a new report about a login (successful or unsuccessful)

Request Body schema: application/json
attrs
object (LTAttrs)
device_id
string
login
required
string
policy_reject
boolean
protocol
string
Enum:"http" "imap" "pop3" "smtp" "mobileapi"
pwhash
required
string
remote
required
string
success
required
boolean
tls
boolean

Responses

200

report response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "login": "joe.bloggs",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

reset

post /?command=reset
http://doesnotexist.open-xchange.com/?command=reset

Reset the stats and any blacklist entry for an IP and/or login

Request Body schema: application/json
ip
string
login
string

Responses

200

reset response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "ip": "127.0.0.1"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

stats

get /?command=stats
http://doesnotexist.open-xchange.com/?command=stats

Get server stats

Responses

200

stats response

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "allows": 120321,
  • "commandstats":
    {
    },
  • "customstats":
    {
    },
  • "denieds": 20201,
  • "perfstats":
    {
    },
  • "reports": 28291,
  • "sys-msec": 97211221,
  • "user-msec": 292910108
}

syncDBs

post /?command=syncDBs
http://doesnotexist.open-xchange.com/?command=syncDBs

This is a request to synchronize StatsDBs.

Request Body schema: application/json
callback_auth_pw
string
callback_url
required
string
replication_host
required
string
replication_port
required
integer

Responses

200

syncDBs response

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "callback_auth_pw": "string",
  • "callback_url": "string",
  • "replication_host": "string",
  • "replication_port": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

syncDone

get /?command=syncDone
http://doesnotexist.open-xchange.com/?command=syncDone

Tell the server that DB syncing is done

Responses

200

syncDone response

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}