DNSBLv5APIv3: GET/POST/PUT/DELETE requests

Table of contents


Handled requests

Endpoint

/3.0/dnsbl/

No additional verbs are requred but works fine. They are however not documented here, as they are not officially supported.

This endpoint is a simplified, generic, endpoint for several calls: All requests that handles blacklist editing is affected by this service.

Subchapter

This is a chapter with described subcommands on how to handle the interface.

Description and best practices

The standard request for checking listed ipaddresses looks like this and uses the endpoint above, (https://api.tornevall.net/3.0/dnsbl/) with a HTTP POST. All posts supports both HTTP POST requests and json-requests (Content-Type: application/json). This example requests status for two hosts: 1.2.3.4 and 5.6.7.8 (which are fictive addresses and might not exist in the database).

Best practice advices

In the DNS world, the addresses below is formatted like this: 77.12.11.44.dnsbl.tornevall.org and 30.14.33.18.dnsbl.tornevall.org and returns, in the examples, 127.0.0.84 (at least one of them). This is also why you should consider DNS lookups when making "normal" requests. The advantage of a DNS request like this is that DNS-services responds much faster and is served around the world, which means the fastest server will answer. If your site is large, you will probably take notice of this as API requests might slow you down with many requests.