Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodURLInformationData (POST parameters)Expected response
HTTP POST

https://api.tornevall.net/3.0/dnsbl/

or

https://api.tornevall.com/3.0/dnsbl/request/ip/1.2.3.4

HTTP POST has the same role as HTTP GET but with post parameters. Supports IPv6.

URL-encoded or JSON-formatted:

Code Block
// simple json
{"ip":"1.2.3.4"}
// simple http post
&ip=1.2.3.4
// multiple json
{"ip":["1.2.3.4", "5.6.7.8"]}
// multiple http post
ip[]=1.2.3.4&ip[]=5.6.7.8

This example is the same for the rest of examples in this table.

Is ip listed?
HTTP PUThttps://api.tornevall.net/3.0/dnsbl/Insert or update ip address


The bitmast
<ipAddress>Address to insert or update in DNSBL
<type>

What to update (defaults to dnsbl)

This information will update

<flags>ipArray with ip address and bitmasked flag-per-ip

The bitmask flags mentions here

Example:

Code Block
languagejs
titleDo blacklist
{
	"ip": {
		"110.210.310.4"10": 64
	},
	"flags":64,
	"type":"dnsbl"
}type": "dnsbl"
}

Response Look:

Response parameters (status) described

successThe insertion ID
addressThe address that was update or inserted
stateDefines if the request already has the address blacklisted or if it was updated. Answers can be new or update.
arpaDelegationsA list of DNS-records that was registered or updated
flagThe flag of the blacklisted address


Code Block
languagejs
titleDo blacklist
{
	"dnsblResponse": {
		"status": [{
			"success": "1934699",
			"address": "10.10.10.10",
			"state": "new",
			"arpaDelegations": [
				"10.10.10.10.dnsbl.tornevall.org"
			],
			"flag": "64"
		}]
	}
}



HTTP DELETEhttps://api.tornevall.net/3.0/dnsbl/Delist (delete/remove) ip address

Example:

Code Block
languagejs
titleDo blacklist
{
	"ip":"1.2.3.4",
}



...