Overview

Long story short - here is how Qrator API works:

POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Length: 38
Content-Type: application/json

{"method":"ping","params":null,"id":1}


HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Length: 38
Content-Type: application/json
X-Qrator-Auth: aabbccddeeff

{"method":"ping","params":null,"id":1}

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}

API concept

Qrator API provides its interface as a JSON-RPC web service.

In order to forward your request to the Qrator API, create a POST request to https://api.qrator.net.

Currently Qrator API uses JSON-RPC 1.0.

In case you don't use any library to form request for you - make sure that you request is HTTP/1.0 or HTTP/1.1 compliant.

All provided examples use HTTP/1.0, you are free to do same way or use HTTP/1.1 with Connection: keepalive.

Version

Current version of Qrator API is 1.1.3

Qrator API retains backward compatibility with all previous versions.

Authorization

IP-Auth

Qrator API uses authorization based on source IP addresses of API call. To gain access to Qrator API you should create new ticket at personal dashboard this request to add your IP address to trusted IP list.

During actual Qrator API call you don't need to do anything about authorization.

Token-Auth

Qrator API also enables token-based authorization. This method is intended to eventually replace the older IP-based authorization, works independently and does not require the former auth method to work for the client who has chosen to use the new one.

In order to enable this method you need to acquire an access token from the personal dashboard. This token may grant permission to call different API methods according to selected settings:

  • Domain methods for a specific domain
  • Domain methods for all domain and client methods

The token is transmitted in a HTTP header X-Qrator-Auth field of the API call. Please take note that token-based authorization works only when HTTPS/TLS/SSL is used to access Qrator API. Should the token be passed in plain HTTP or be absent in the request, the security check reverts back to IP-based authorization method for the sake of backwards compatibility.

Data types

ContactList

Added in v 1.0.15

List of contacts registered at Qrator personal dashboard

[
    {
        "id": 1,
        "email": "john@example.com",
        "first_name": "John",
        "middle_name": "Random",
        "last_name": "User",
        "role": {
            "tech": false,
            "finance": true,
            "administrative": true
        }
    }
]

DomainList

Added in v 1.0.4

List of domains and services (see also UpstreamConfiguration and ServicePorts):

{
    "result": [
        {
            "id": 1,
            "name": "example.com",
            "status": "online",
            "ip": [
                "198.51.100.12"
            ],
            "ip_json": {
                "balancer": "roundrobin",
                "weights": false,
                "backups": false,
                "upstreams": [
                    {
                        "type": "primary",
                        "ip": "192.0.2.7",
                        "weight": 0,
                        "name": ""
                    },
                    {
                        "type": "primary",
                        "ip": "192.0.2.1",
                        "weight": 1,
                        "name": "some name just for you"
                    },
                    {
                        "type": "primary",
                        "ip": "198.51.100.12",
                        "weight": 1,
                        "name": "test"
                    }
                ]
            },
            "qratorIp": "203.0.113.1",
            "isService": false,
            "ports": null
        },
        {
            "id": 2,
            "name": "text.example.com",
            "status": "online",
            "ip": [
                "178.248.232.2"
            ],
            "ip_json": [
                "198.51.100.12"
            ],
            "qratorIp": "service",
            "isService": true,
            "ports": {
                "53": "dns",
                "79": [
                    "tcp",
                    "udp"
                ],
                "80": "http",
                "443": "http"
            }
        }
    ],
    "error": null,
    "id": 1
}

Field ports will always be null for domains and ServicePorts for services.

Field ip_json will always be object for domains and list for services.

Enum

An enumeration is a distinct type whose value is restricted to a range of values.

IP

String representation of IPv4 address, for example: "192.0.2.1"

{
    "method": "method_name",
    "params": [
        "192.0.2.1"
    ],
    "id": 1
}

Please note all IPs used in examples are from loopback interface, private local networks or documentation IP-ranges.
While using examples please make sure you use valid IPs.

IPList

List of IPs.

See domain method test_iplist, that helps to with formatting parameters of this type.

{
    "method": "method_name",
    "params": [
        "192.0.2.1",
        "198.51.100.12"
    ],
    "id": 1
}

Month

Added in v 1.1.2

Representation for year+month, could have one of given forms:

// minus-separated string
"2019-07" or "06-2019" 

// array
[2019, 6]

// object
{"year": 2019, "month": 4}

NULL

Regular null value

NetworkList

Added in v 1.0.10

List of IP/mask networks

[
    "192.0.2.1/32",
    "198.51.100.0/24"
]

Number

Just a number huh ;)

Prefix

Ordinary string representation. For example, "127.255.0.0/24"

{
    "method": "method_name",
    "params": [
        "127.255.0.0/24"
    ],
    "id": 1
}

PrefixList

List of prefixes with announce statuses:

{
    "result": [
        {
            "announce": "offline",
            "prefix": "178.248.232.0/23"
        },
        {
            "announce": "offline",
            "prefix": "178.248.232.0/24"
        }
    ],
    "error": null,
    "id": 1
}

RequestSuccess

Subtype of String with a single possible value: Successful.

{
    "result": "Successful",
    "error": null,
    "id": 1
}

ServicePorts

Added in v 1.0.11

Set of numeric ports and ServiceProto

{
    "method": "<method name>",
    "params": {
        "53": "dns",
        "79": [
            "tcp",
            "udp"
        ],
        "80": "http",
        "443": "http"
    },
    "id": 1
}

Please note: possible port number values are 1-65535.

As you can see in example above, protos can be specified as list.

Only following values of ServiceProto are valid:

  • ["http"]
  • ["tcp"]
  • ["udp"]
  • ["dns"]
  • ["tcp","udp"]

When supplied single ServiceProto it could be used either as a String or as a List

ServiceProto

Added in v 1.0.11

String representation of service protocol, current supported protocols:

  • http
  • tcp
  • udp
  • udp
  • dns

StatisticsCurrentHTTP

Added in v 1.1.2

Object, representing latest statistics snapshot for HTTP-metrics

{
    "result": {
        "time": 1563204000, // timestamp for snapshot
        "requests": 0,      // request rate (rps)
        "responses": {
            "0000_0200": 0, // responses rate (rsp), duration 0.0-0.2s
            "0200_0500": 0, // responses rate (rsp), duration 0.2-0.5s
            "0500_0700": 0, // responses rate (rsp), duration 0.5-0.7s
            "0700_1000": 0, // responses rate (rsp), duration 0.7-1.0s
            "1000_1500": 0, // responses rate (rsp), duration 1.0-1.5s
            "1500_2000": 0, // responses rate (rsp), duration 1.5-2.0s
            "2000_5000": 0, // responses rate (rsp), duration 2.0-5.0s
            "5000_inf": 0   // responses rate (rsp), duration over 5s
        },
        "errors": {
            "total": 0,     // errors rate (rsp), total 
            "500": 0,       // errors rate (rsp), HTTP-500
            "501": 0,       // errors rate (rsp), HTTP-501
            "502": 0,       // errors rate (rsp), HTTP-502
            "503": 0,       // errors rate (rsp), HTTP-503
            "504": 0        // errors rate (rsp), HTTP-504
        }
    },
    "error": null,
    "id: 1
}

StatisticsCurrentIP

Added in v 1.1.2

Object, representing latest statistics snapshot for IP-metrics

{
    "result": {
        "time": 1563204000, // timestamp for snapshot
        "bandwidth": {
            "input": 0,     // incoming traffic (bps)
            "passed": 0,    // passed traffic (bps)
            "output": 0     // outgoing traffic (bps)
        },
        "packets": {
            "input": 0,     // incoming packets (pps)
            "passed": 0,    // passed packets (pps)
            "output": 0     // outgoing packets (pps)
        },
        "blacklist": {
            "qrator": 0,    // number of IPs banned by Qrator
            "api": 0,       // number of IPs banned by client via Qrator.API
            "waf": 0        // number of IPs banned by WAF
        }
    },
    "error": null,
    "id: 1
}

StatisticsResponse

Object, representing latest statistics snapshot, with following fields:

{
    "result": {
        "time": 1469998800,  // timestamp for snapshot
        "bsend": 0,          // bypassed traffic (bps)
        "brecv": 0,          // incoming traffic (bps)
        "bout": 0,           // outgoing traffic (bps)
        "psend": 0,          // bypassed packets (pps)
        "precv": 0,          // incoming packets (pps)
        "reqspeed": 0,       // request rate(rps)
        "reqlonger10s": 0,   // number of responses having response time > 1.0s
        "reqlonger07s": 0,   // number of responses having response time > 0.7s
        "reqlonger05s": 0,   // number of responses having response time > 0.5s
        "reqlonger02s": 0,   // number of responses having response time > 0.2s
        "reqall": 0,         // total number of responses
        "err50x": 0,         // number of HTTP 50X errors
        "err501": 0,         // number of HTTP 501 errors
        "err502": 0,         // number of HTTP 502 errors
        "err503": 0,         // number of HTTP 503 errors
        "err504": 0,         // number of HTTP 504 errors
        "ban": 0,            // number of IPs banned by Qrator
        "ban_api": 0,        // number of IPs banned by client via Qrator.API
        "ban_waf": 0,        // number of IPs banned by WAF
        "ban_geo": {},       // an object containing countries with number of banned IPs
        "billable": 0        // billable traffic (Mbps)
    },
    "error": null,
    "id: 1
}

ban_geo - for this dictionary, keys are 2-letter strings representing ISO 3166-1 alpha-2 country code, and values are the count of IP addresses banned for the corresponding country

StatisticsResponseLite

Object, representing latest lite statistics snapshot (without "billable"), with following fields:

{
    "result": {
        "time": 1469998800,  // timestamp for snapshot
        "bsend": 0,          // bypassed traffic (bps)
        "brecv": 0,          // incoming traffic (bps)
        "bout": 0,           // outgoing traffic (bps)
        "psend": 0,          // bypassed packets (pps)
        "precv": 0,          // incoming packets (pps)
        "reqspeed": 0,       // request rate(rps)
        "reqlonger10s": 0,   // number of responses having response time > 1.0s
        "reqlonger07s": 0,   // number of responses having response time > 0.7s
        "reqlonger05s": 0,   // number of responses having response time > 0.5s
        "reqlonger02s": 0,   // number of responses having response time > 0.2s
        "reqall": 0,         // total number of responses
        "err50x": 0,         // number of HTTP 50X errors
        "err501": 0,         // number of HTTP 501 errors
        "err502": 0,         // number of HTTP 502 errors
        "err503": 0,         // number of HTTP 503 errors
        "err504": 0,         // number of HTTP 504 errors
        "ban": 0,            // number of IPs banned by Qrator
        "ban_api": 0,        // number of IPs banned by client via Qrator.API
        "ban_waf": 0,        // number of IPs banned by WAF
        "ban_geo": {}        // an object containing countries with number of banned IPs
    },
    "error": null,
    "id: 1
}

ban_geo - for this dictionary, keys are 2-letter strings representing ISO 3166-1 alpha-2 country code, and values are the count of IP addresses banned for the corresponding country

String

Just string, used in methods like ping or troubleshoot_traceroute.

{
    "result": "pong",
    "error": null,
    "id": 1
}

TimedIP

Added in v 1.0.3

Couple of IP, represented by string, and time (seconds), represented by non negative number:

[
    "192.0.2.1",
    300
]

0 as "time" parameter will be interpreted as infinity

Currently Qrator API doesn't use TimedIP directly, please see TimedIPList.

TimedIPList

Added in v 1.0.3

List of TimedIPs

See domain method test_timediplist, that helps to with formatting parameters of this type.

{
    "method": "method_name",
    "params": [
        [
            "192.0.2.1",
            300
        ],
        [
            "198.51.100.12",
            720
        ]
    ],
    "id": 1
}

This type is compatible to IPList and you can even mix IP and TimedIP, but only for method that accepts TimedIPList:

{
    "method": "method_name",
    "params": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "id": 1
}

UpstreamConfiguration

Added in v 1.0.5

Object representing upstream configuration

{
    "method": "method_name",
    "params": {
        "balancer": "roundrobin",
        "weights": false,
        "backups": false,
        "upstreams": [
            {
                "type": "primary",
                "ip": "192.0.2.7",
                "weight": 0,
                "name": ""
            },
            {
                "type": "primary",
                "ip": "192.0.2.1",
                "weight": 1,
                "name": "some name just for you"
            },
            {
                "type": "primary",
                "ip": "198.51.100.12",
                "weight": 1,
                "name": "test"
            }
        ]
    },
    "id": 1
}

UpstreamTestResult

Validation result for upstream for IPList:

{
    "result": {
        "error": null,
        "warning": [],
        "object": [
            [
                "192.0.2.1",
                "198.51.100.12"
            ]
        ]
    },
    "error": null,
    "id": 1
}

Validation result for upstream for UpstreamConfiguration:

{
    "result": {
        "error": null,
        "warning": [],
        "object": {
            "balancer": "roundrobin",
            "weights": false,
            "backups": false,
            "upstreams": [
                {
                    "type": "primary",
                    "ip": "192.0.2.7",
                    "weight": 0,
                    "name": ""
                },
                {
                    "type": "primary",
                    "ip": "192.0.2.1",
                    "weight": 1,
                    "name": "some name just for you"
                },
                {
                    "type": "primary",
                    "ip": "198.51.100.12",
                    "weight": 1,
                    "name": "test"
                }
            ]
        }
    },
    "error": null,
    "id": 1
}

Errors

Common reasons

Following error are common for all methods.

Error reasons are Strings from this list:

BadRequest

Most common problems - malformed HTTP-request:

  • missing entity id
  • missing or malformed Content-Type header
  • missing or malformed Content-Length header
  • malformed JSON
{
    "result": null,
    "error": "BadRequest",
    "id": 1
}

UnknownMethod

Most common problems:

  • misspelling method name - all Qrator API method are lowercase with underscore
  • wrong call mode name - per-client method cannot be called in per-domain mode
{
    "result": null,
    "error": "UnknownMethod",
    "id": 1
}

BadArguments

There are many reasons for request to return BadArguments error, but 99.99% of them can be fixed by dumping your request and recheck method parameter types.

{
    "result": null,
    "error": "BadArguments",
    "id": 1
}

For example, it is very easy to miss the difference between IPList (with a single IP address) and IP.

// IPList:
{
    "method": "METHOD_NAME",
    "params": [["192.0.2.1"]],
    "id": 1
}
// versus
// IP:
{
    "method": "METHOD_NAME",
    "params": ["192.0.2.1"],
    "id": 1
}

SystemFailure

This error response means that Qrator API couldn't perform your request for some internal reason.

{
    "result": null,
    "error": "SystemFailure",
    "id": 1
}

ACLException

This error response means access if forbidden.

{
    "result": null,
    "error": "ACLException",
    "id": 1
}

Additional headers

To make debugging a little bit easier Qrator API responds with some additional headers, so you can see how Qrator API understands your request:

HTTP/1.1 200 OK
Server: QRATOR
Content-Type: application/json
X-Qrator-API-IP: 192.0.2.1 // calling IP address (string)
X-Qrator-API-SRV: ok       // request parser status (string: ok | fail)
X-Qrator-API-Mode: domain  // method mode (string: domain | client)
X-Qrator-API-ID: 1         // entity ID from URI (int)

<response body>

Debug methods

Base URI

https://api.qrator.net/request/debug/

Note: Debug methods doesn't use authorization and there is no any entity ID in URI.

Troubleshoot

ping

Dummy method used to check that your request is OK and API is sane.

Added

v1.0.12

Parameters

None

Return Values

String "pong"

Example

Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38

{"method":"ping","params":null,"id":1}
Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
X-Qrator-Auth: aabbccddeeff

{"method":"ping","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
{"result":"pong","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
{"result":"pong","error":null,"id":1}
Copy
{
    "result": "pong",
    "error": null,
    "id": 1
}
Copy
null

Test

service_ports_test

Tests given ServicePorts set to be valid.

Added

v1.0.12

Parameters

ServicePorts

Return Values

ServicePorts

Example

Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 110

{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 110
X-Qrator-Auth: aabbccddeeff

{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93

{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
{
    "result": {
        "22": [
            "tcp"
        ],
        "53": [
            "tcp",
            "udp"
        ],
        "80": [
            "http"
        ],
        "443": [
            "http"
        ]
    },
    "error": null,
    "id": 1
}
Copy
{
    "80": [
        "http"
    ],
    "443": [
        "http"
    ],
    "53": [
        "tcp",
        "udp"
    ],
    "22": [
        "tcp"
    ]
}

test_iplist

Test given IP addresses to be valid IPList.

Added

v1.0.12

Parameters

IPList

Return Values

IPList

Example

Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 70

{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 70
X-Qrator-Auth: aabbccddeeff

{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 60

{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' \
  --post-data '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' \
  --data '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        "198.51.100.12"
    ],
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

test_timediplist

Test given IP addresses to be valid TimedIPList.

Added

v1.0.12

Parameters

TimedIPList

Return Values

TimedIPList

Example

Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 80

{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}
Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 80
X-Qrator-Auth: aabbccddeeff

{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 69

{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' \
  --post-data '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' \
  --data '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}'
Copy
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
Copy
{
    "result": [
        [
            "192.0.2.1",
            80
        ],
        [
            "198.51.100.12",
            0
        ]
    ],
    "error": null,
    "id": 1
}
Copy
[
    [
        "192.0.2.1",
        80
    ],
    "198.51.100.12"
]

test_upstreamlist

Test given IP addresses to be valid IPList and it could be used as domain/service upstream.

Added

v1.0.12

Parameters

IPList

Return Values

IPList

Example

Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 76

{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 76
X-Qrator-Auth: aabbccddeeff

{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 60

{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' \
  --post-data '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/debug/ \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' \
  --data '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/debug/ \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        "198.51.100.12"
    ],
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

Client methods

Base URI

https://api.qrator.net/request/client/<client_id>

ID of client may be obtained in personal dashboard - it's "cl0000" thing

at the very top of the page. Make sure to use only number in your Qrator API calls.

Domains

domain_create

Creates single domain

Added

v1.0.23

Parameters

Array of "Upstreams + Name" - [IPList or UpstreamConfiguration, String]

Return Values

Number - id of created domain

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 97

{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 97
X-Qrator-Auth: aabbccddeeff

{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":12,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}' --quiet -O -
Copy
{"result":12,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}'
Copy
{"result":12,"error":null,"id":1}
Copy
{
    "result": 12,
    "error": null,
    "id": 1
}
Copy
[
    [
        "127.0.0.1",
        "127.255.255.254"
    ],
    "domain.example.com"
]

domains_get

Returns list of your domains and services.

Added

v1.0.4

Parameters

None

Return Values

DomainList

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 45

{"method":"domains_get","params":null,"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 45
X-Qrator-Auth: aabbccddeeff

{"method":"domains_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 260

{"result":[{"id":1,"name":"example.com","status":"online","ip":["127.255.255.254"],"qratorIp":"178.248.232.1","isService":false},{"id":2,"name":"text.example.com","status":"online","ip":["127.0.0.1"],"qratorIp":"service","isService":true}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domains_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domains_get","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"id":1,"name":"example.com","status":"online","ip":["127.255.255.254"],"qratorIp":"178.248.232.1","isService":false},{"id":2,"name":"text.example.com","status":"online","ip":["127.0.0.1"],"qratorIp":"service","isService":true}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domains_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domains_get","params":null,"id":1}'
Copy
{"result":[{"id":1,"name":"example.com","status":"online","ip":["127.255.255.254"],"qratorIp":"178.248.232.1","isService":false},{"id":2,"name":"text.example.com","status":"online","ip":["127.0.0.1"],"qratorIp":"service","isService":true}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "id": 1,
            "name": "example.com",
            "status": "online",
            "ip": [
                "127.255.255.254"
            ],
            "qratorIp": "178.248.232.1",
            "isService": false
        },
        {
            "id": 2,
            "name": "text.example.com",
            "status": "online",
            "ip": [
                "127.0.0.1"
            ],
            "qratorIp": "service",
            "isService": true
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

Prefixes

prefix_announce_off

Turns prefix announcing off.

Parameters

Prefix

Return Values

RequestSuccess

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69

{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
X-Qrator-Auth: aabbccddeeff

{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "178.248.232.0/23"
]

prefix_announce_on

Turns prefix announcing on.

Parameters

Prefix

Return Values

RequestSuccess

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 68

{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 68
X-Qrator-Auth: aabbccddeeff

{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "178.248.232.0/23"
]

prefix_announce_status

Returns announce status of given prefix.

Parameters

Prefix

Return Values

Enum with value from following list:

  • online: prefix is announcing
  • offline: prefix not announcing
  • pending: some operations are performed on the prefix
  • error: previous operation failed

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 72

{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 72
X-Qrator-Auth: aabbccddeeff

{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 40

{"result":"offline","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}' --quiet -O -
Copy
{"result":"offline","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}'
Copy
{"result":"offline","error":null,"id":1}
Copy
{
    "result": "offline",
    "error": null,
    "id": 1
}
Copy
[
    "178.248.232.0/23"
]

prefix_list

Returns list of your prefixes.

Parameters

None

Return Values

PrefixList

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 45

{"method":"prefix_list","params":null,"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 45
X-Qrator-Auth: aabbccddeeff

{"method":"prefix_list","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 134

{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"prefix_list","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"prefix_list","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"prefix_list","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"prefix_list","params":null,"id":1}'
Copy
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "announce": "offline",
            "prefix": "178.248.232.0/23"
        },
        {
            "announce": "offline",
            "prefix": "178.248.232.0/24"
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

Services

service_create

Creates single service

Added

v1.0.23

Parameters

Array of "Upstreams + Ports + Name" - [ IPList, ServicePorts, String]

Return Values

Number - id of created service

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 156

{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 156
X-Qrator-Auth: aabbccddeeff

{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":13,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}' --quiet -O -
Copy
{"result":13,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_create","params":[["127.0.0.1","127.255.255.254"],{"22":"tcp","53":["tcp","udp"],"80":"http","443":"http"},"service.example.com"],"id":1}'
Copy
{"result":13,"error":null,"id":1}
Copy
{
    "result": 13,
    "error": null,
    "id": 1
}
Copy
[
    [
        "127.0.0.1",
        "127.255.255.254"
    ],
    {
        "22": "tcp",
        "53": [
            "tcp",
            "udp"
        ],
        "80": "http",
        "443": "http"
    },
    "service.example.com"
]

Blacklist

blacklist_check

Checks if given IP address is blacklisted or not for active domains and services.

Added

v1.0.13

Parameters

IP

Return Values

Enum with value from following list:

  • Banned: given IP address is blacklisted
  • NotBanned: given IP address is not blacklisted

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 61

{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
Copy
{
    "result": {
        "1": "Banned",
        "2": "NotBanned"
    },
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

blacklist_status

Checks if given IP address is blacklisted or not, if it is - return reason, for active domains and services.

Added

v1.0.13

Parameters

IP

Return Values

Enum with value from following list:

  • NotBanned: IP address is not blacklisted by Qrator, API, client or WAF
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 59

{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
Copy
{
    "result": {
        "1": "HTTP",
        "2": "NotBanned"
    },
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

Contacts

contacts_get

Returns list of contacts registered at Qrator personal dashboard

Added

v1.0.15

Parameters

None

Return Values

ContactList

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 46

{"method":"contacts_get","params":null,"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 46
X-Qrator-Auth: aabbccddeeff

{"method":"contacts_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 189

{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"tech":false,"finance":true,"administrative":true}}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"contacts_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"contacts_get","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"tech":false,"finance":true,"administrative":true}}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"contacts_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"contacts_get","params":null,"id":1}'
Copy
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"tech":false,"finance":true,"administrative":true}}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "id": 1,
            "email": "john@example.com",
            "first_name": "John",
            "middle_name": "Random",
            "last_name": "User",
            "role": {
                "tech": false,
                "finance": true,
                "administrative": true
            }
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

Troubleshoot

ip_status

Checks status of given IP address for active domains and services.

Added

v1.0.13

Parameters

IP

Return Values

Enum with value from following list:

  • Upstream: IP address is one of the upstreams IPs
  • Whitelisted: IP address is whitelisted
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF
  • NotBanned: IP address is is neither upstream nor the whitelisted, nor the blacklisted

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 54

{"method":"ip_status","params":"198.51.100.12","id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 54
X-Qrator-Auth: aabbccddeeff

{"method":"ip_status","params":"198.51.100.12","id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 59

{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ip_status","params":"198.51.100.12","id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ip_status","params":"198.51.100.12","id":1}' --quiet -O -
Copy
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ip_status","params":"198.51.100.12","id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ip_status","params":"198.51.100.12","id":1}'
Copy
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
Copy
{
    "result": {
        "1": "Allowed",
        "2": "Banned"
    },
    "error": null,
    "id": 1
}
Copy
"198.51.100.12"

ping

Dummy method used to check that your request is OK and API is sane.

Parameters

None

Return Values

String "pong"

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38

{"method":"ping","params":null,"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
X-Qrator-Auth: aabbccddeeff

{"method":"ping","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
{"result":"pong","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
{"result":"pong","error":null,"id":1}
Copy
{
    "result": "pong",
    "error": null,
    "id": 1
}
Copy
null

source_ips_get

Returns list networks Qrator uses to access your servers

Added

v1.0.10

Parameters

None

Return Values

NetworkList

Example

Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48

{"method":"source_ips_get","params":null,"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
X-Qrator-Auth: aabbccddeeff

{"method":"source_ips_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 65

{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"source_ips_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"source_ips_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"source_ips_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"source_ips_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1/32",
        "198.51.100.0/24"
    ],
    "error": null,
    "id": 1
}
Copy
null

Domain methods

Base URI

https://api.qrator.net/request/domain/<domain_id>

ID of domain may be obtained in personal dashboard at domains control section- it's "d0000" thing besides domain name. Make sure to use only number in your Qrator API calls.

Domain Name

domain_name_get

Returns current domain name.

Deprecated

v1.1.2

Parameters

None

Return Values

String

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49

{"method":"domain_name_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff

{"method":"domain_name_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{"result":"example.com","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_name_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_name_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"example.com","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_name_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_name_get","params":null,"id":1}'
Copy
{"result":"example.com","error":null,"id":1}
Copy
{
    "result": "example.com",
    "error": null,
    "id": 1
}
Copy
null

domain_name_set

Sets name for domain

Deprecated

v1.1.2

Parameters

String

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 58

{"method":"domain_name_set","params":"example.com","id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 58
X-Qrator-Auth: aabbccddeeff

{"method":"domain_name_set","params":"example.com","id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_name_set","params":"example.com","id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_name_set","params":"example.com","id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_name_set","params":"example.com","id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_name_set","params":"example.com","id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
"example.com"

name_get

Returns current domain name.

Replacement for domain_name_get and service_name_get methods

Added

v1.1.2

Parameters

None

Return Values

String

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 42

{"method":"name_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 42
X-Qrator-Auth: aabbccddeeff

{"method":"name_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{"result":"example.com","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"example.com","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"name_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"name_get","params":null,"id":1}'
Copy
{"result":"example.com","error":null,"id":1}
Copy
{
    "result": "example.com",
    "error": null,
    "id": 1
}
Copy
null

name_set

Sets name for domain

Replacement for domain_name_set and service_name_set methods

Added

v1.1.2

Parameters

String

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51

{"method":"name_set","params":"example.com","id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff

{"method":"name_set","params":"example.com","id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"name_set","params":"example.com","id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"name_set","params":"example.com","id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"name_set","params":"example.com","id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"name_set","params":"example.com","id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
"example.com"

Domain Status

domain_status_get

Returns current domain status.

Deprecated

v1.1.2

Parameters

None

Return Values

Enum with value from following list:

  • offline: domain is offline
  • online: domain is online
  • pending: some operations are performed on the domain
  • error: previous operation failed

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51

{"method":"domain_status_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff

{"method":"domain_status_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39

{"result":"online","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_status_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_status_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"online","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_status_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_status_get","params":null,"id":1}'
Copy
{"result":"online","error":null,"id":1}
Copy
{
    "result": "online",
    "error": null,
    "id": 1
}
Copy
null

status_get

Returns current resource status.

Replacement for domain_status_get and service_status_get methods

Parameters

None

Return Values

Enum with value from following list:

  • offline: domain is offline
  • online: domain is online
  • pending: some operations are performed on the domain
  • error: previous operation failed

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 44

{"method":"status_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 44
X-Qrator-Auth: aabbccddeeff

{"method":"status_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39

{"result":"online","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"online","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"status_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"status_get","params":null,"id":1}'
Copy
{"result":"online","error":null,"id":1}
Copy
{
    "result": "online",
    "error": null,
    "id": 1
}
Copy
null

Domain IP

domain_ip_get

Returns current upstreams IPs as JSON configuration.

name just for you"},{"type":"primary","ip":"127.255.255.254","weight":1,"name":"test"}]}

Parameters

None

Return Values

UpstreamConfiguration

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47

{"method":"domain_ip_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47
X-Qrator-Auth: aabbccddeeff

{"method":"domain_ip_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 255

{"result":"{\"balancer\":\"roundrobin\",\"weights\":false,\"backups\":false,\"upstreams\":[{\"type\":\"primary\",\"ip\":\"127.0.0.2\",\"weight\":0,\"name\":\"\"},{\"type\":\"primary\",\"ip\":\"127.0.0.1\",\"weight\":1,\"name\":\"some","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_ip_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_ip_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"{\"balancer\":\"roundrobin\",\"weights\":false,\"backups\":false,\"upstreams\":[{\"type\":\"primary\",\"ip\":\"127.0.0.2\",\"weight\":0,\"name\":\"\"},{\"type\":\"primary\",\"ip\":\"127.0.0.1\",\"weight\":1,\"name\":\"some","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_ip_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_ip_get","params":null,"id":1}'
Copy
{"result":"{\"balancer\":\"roundrobin\",\"weights\":false,\"backups\":false,\"upstreams\":[{\"type\":\"primary\",\"ip\":\"127.0.0.2\",\"weight\":0,\"name\":\"\"},{\"type\":\"primary\",\"ip\":\"127.0.0.1\",\"weight\":1,\"name\":\"some","error":null,"id":1}
Copy
{
    "result": "{\"balancer\":\"roundrobin\",\"weights\":false,\"backups\":false,\"upstreams\":[{\"type\":\"primary\",\"ip\":\"127.0.0.2\",\"weight\":0,\"name\":\"\"},{\"type\":\"primary\",\"ip\":\"127.0.0.1\",\"weight\":1,\"name\":\"some",
    "error": null,
    "id": 1
}
Copy
null

domain_ip_get_list

Returns current upstreams IPs as simple list.

Parameters

None

Return Values

IPList

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52

{"method":"domain_ip_get_list","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff

{"method":"domain_ip_get_list","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 62

{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_ip_get_list","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_ip_get_list","params":null,"id":1}' --quiet -O -
Copy
{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_ip_get_list","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_ip_get_list","params":null,"id":1}'
Copy
{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
Copy
{
    "result": [
        "127.0.0.1",
        "127.255.255.254"
    ],
    "error": null,
    "id": 1
}
Copy
null

domain_ip_set

Sets domains upstream IPs or configuration.

Parameters

IPList or UpstreamConfiguration

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 74

{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 74
X-Qrator-Auth: aabbccddeeff

{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "127.0.0.1",
    "127.255.255.254"
]

domain_ip_test

Tests given parameters to be valid.

Parameters

IPList or UpstreamConfiguration

Return Values

UpstreamTestResult

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75

{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75
X-Qrator-Auth: aabbccddeeff

{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 99

{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}' --quiet -O -
Copy
{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}'
Copy
{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
Copy
{
    "result": {
        "error": null,
        "warning": [],
        "object": [
            "127.0.0.1",
            "127.255.255.254"
        ]
    },
    "error": null,
    "id": 1
}
Copy
[
    "127.0.0.1",
    "127.255.255.254"
]

Whitelist

whitelist_append

Added given IP addresses to whitelist.

Parameters

IPList or TimedIPList

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81

{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    [
        "198.51.100.12",
        720
    ]
]

whitelist_get

Returns whitelist contents.

Parameters

None

Return Values

IPList or TimedIPList

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47

{"method":"whitelist_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "error": null,
    "id": 1
}
Copy
null

whitelist_remove

Removes given IP addresses from whitelist.

Parameters

IPList

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75

{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

Blacklist

blacklist_append

Added given IP addresses to blacklist.

Parameters

IPList or TimedIPList

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81

{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    [
        "198.51.100.12",
        720
    ]
]

blacklist_check

Checks if given IP address is blacklisted or not.

Parameters

IP

Return Values

Enum with value from following list:

  • Banned: given IP address is blacklisted
  • NotBanned: given IP address is not blacklisted

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

blacklist_flush

Removes from blacklist all IP addresses, that been added using Qrator API

Parameters

None

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49

{"method":"blacklist_flush","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_flush","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_flush","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_flush","params":null,"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
null

blacklist_get

Returns blacklist contents.

Parameters

None

Return Values

TimedIPList

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47

{"method":"blacklist_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "error": null,
    "id": 1
}
Copy
null

blacklist_remove

Removes given IP addresses from blacklist.

Parameters

IPList

Return Values

RequestSuccess

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75

{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

blacklist_status

Checks if given IP address is blacklisted or not, if it is - return reason.

Parameters

IP

Return Values

Enum with value from following list:

  • NotBanned: IP address is not blacklisted by Qrator, API, client or WAF
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

Statistics

statistics_billable

Returns billable traffic (Mbps) for given month.

This method uses new staticstics storage (same as personal cabinet)

Added

v1.1.2

Parameters

Month or NULL (for current month)

Return Values

Number

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53

{"method":"statistics_billable","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_billable","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":12,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
Copy
{"result":12,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_billable","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_billable","params":null,"id":1}'
Copy
{"result":12,"error":null,"id":1}
Copy
{
    "result": 12,
    "error": null,
    "id": 1
}
Copy
null

statistics_current_http

Returns lastest HTTP-staticstics snapshot.

This method uses new statistics storage (same as personal cabinet)

Parameters

None

Return Values

StatisticsCurrentHTTP

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57

{"method":"statistics_current_http","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_current_http","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 249

{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_http","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_current_http","params":null,"id":1}'
Copy
{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1563204000,
        "requests": 0,
        "responses": {
            "0000_0200": 0,
            "0200_0500": 0,
            "0500_0700": 0,
            "0700_1000": 0,
            "1000_1500": 0,
            "1500_2000": 0,
            "2000_5000": 0,
            "5000_inf": 0
        },
        "errors": {
            "total": 0,
            "500": 0,
            "501": 0,
            "502": 0,
            "503": 0,
            "504": 0
        }
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_current_ip

Returns lastest IP-staticstics snapshot.

This method uses new statistics storage (same as personal cabinet)

Parameters

None

Return Values

StatisticsCurrentIP

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55

{"method":"statistics_current_ip","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_current_ip","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 181

{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_ip","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_current_ip","params":null,"id":1}'
Copy
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1563204000,
        "bandwidth": {
            "input": 0,
            "passed": 0,
            "output": 0
        },
        "packets": {
            "input": 0,
            "passed": 0,
            "output": 0
        },
        "blacklist": {
            "qrator": 0,
            "api": 0,
            "waf": 0
        }
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_get

Returns latest statistics snapshot.

This method uses legacy statistics storage use statistics_current_ip, statistics_current_http, statistics_billable methods.

Deprecated

v1.1.2

Parameters

None

Return Values

StatisticsResponse

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48

{"method":"statistics_get","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 310

{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_get","params":null,"id":1}'
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1469998800,
        "bsend": 0,
        "brecv": 0,
        "bout": 0,
        "psend": 0,
        "precv": 0,
        "reqspeed": 0,
        "reqlonger10s": 0,
        "reqlonger07s": 0,
        "reqlonger05s": 0,
        "reqlonger02s": 0,
        "reqall": 0,
        "err50x": 0,
        "err501": 0,
        "err502": 0,
        "err503": 0,
        "err504": 0,
        "ban": 0,
        "ban_api": 0,
        "ban_waf": 0,
        "ban_geo": {
            "RU": 1
        },
        "billable": 0
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_get_lite

Returns latest lite statistics (without "billable") snapshot.

This method uses legacy statistics storage use statistics_current_ip and statistics_current_http methods.

Deprecated

v1.1.2

Parameters

None

Return Values

StatisticsResponseLite

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53

{"method":"statistics_get_lite","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_get_lite","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 297

{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_get_lite","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_get_lite","params":null,"id":1}'
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1469998800,
        "bsend": 0,
        "brecv": 0,
        "bout": 0,
        "psend": 0,
        "precv": 0,
        "reqspeed": 0,
        "reqlonger10s": 0,
        "reqlonger07s": 0,
        "reqlonger05s": 0,
        "reqlonger02s": 0,
        "reqall": 0,
        "err50x": 0,
        "err501": 0,
        "err502": 0,
        "err503": 0,
        "err504": 0,
        "ban": 0,
        "ban_api": 0,
        "ban_waf": 0,
        "ban_geo": {
            "RU": 1
        }
    },
    "error": null,
    "id": 1
}
Copy
null

Troubleshoot

ip_status

Checks status of given IP address.

Added

v1.0.7

Parameters

IP

Return Values

Enum with value from following list:

  • Upstream: IP address is one of the upstreams IPs
  • Whitelisted: IP address is whitelisted
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF
  • NotBanned: IP address is is neither upstream nor the whitelisted, nor the blacklisted

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56

{"method":"ip_status","params":["198.51.100.12"],"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
X-Qrator-Auth: aabbccddeeff

{"method":"ip_status","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

ping

Dummy method used to check that your request is OK and API is sane.

Parameters

None

Return Values

String "pong"

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38

{"method":"ping","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
X-Qrator-Auth: aabbccddeeff

{"method":"ping","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
{"result":"pong","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
{"result":"pong","error":null,"id":1}
Copy
{
    "result": "pong",
    "error": null,
    "id": 1
}
Copy
null

troubleshoot_traceroute

Performs TCP traceroute to specified IP from active Qrator nodes.

Only active domain's upstream IP addresses allowed to be used with this method.

Parameters

IP

Return Values

String

Example

Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57

{"method":"troubleshoot_traceroute","params":null,"id":1}
Copy
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57
X-Qrator-Auth: aabbccddeeff

{"method":"troubleshoot_traceroute","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 61

{"result":"... a lot of trace lines ...","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"troubleshoot_traceroute","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"troubleshoot_traceroute","params":null,"id":1}' --quiet -O -
Copy
{"result":"... a lot of trace lines ...","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"troubleshoot_traceroute","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"troubleshoot_traceroute","params":null,"id":1}'
Copy
{"result":"... a lot of trace lines ...","error":null,"id":1}
Copy
{
    "result": "... a lot of trace lines ...",
    "error": null,
    "id": 1
}
Copy
null

Service methods

Base URI

https://api.qrator.net/request/service/<service_id>

ID of service may be obtained in personal dashboard at services control section- it's "d0000" thing besides service name. Make sure to use only number in your Qrator API calls.

Service Name

name_get

Returns current domain name.

Replacement for domain_name_get and service_name_get methods

Added

v1.1.2

Parameters

None

Return Values

String

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 42

{"method":"name_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 42
X-Qrator-Auth: aabbccddeeff

{"method":"name_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{"result":"example.com","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"example.com","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"name_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"name_get","params":null,"id":1}'
Copy
{"result":"example.com","error":null,"id":1}
Copy
{
    "result": "example.com",
    "error": null,
    "id": 1
}
Copy
null

name_set

Sets name for domain

Replacement for domain_name_set and service_name_set methods

Added

v1.1.2

Parameters

String

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51

{"method":"name_set","params":"example.com","id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff

{"method":"name_set","params":"example.com","id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"name_set","params":"example.com","id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"name_set","params":"example.com","id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"name_set","params":"example.com","id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"name_set","params":"example.com","id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
"example.com"

service_name_get

Returns current service name.

Deprecated

v1.1.2

Parameters

None

Return Values

String

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50

{"method":"service_name_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
X-Qrator-Auth: aabbccddeeff

{"method":"service_name_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{"result":"example.com","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_name_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_name_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"example.com","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_name_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_name_get","params":null,"id":1}'
Copy
{"result":"example.com","error":null,"id":1}
Copy
{
    "result": "example.com",
    "error": null,
    "id": 1
}
Copy
null

service_name_set

Sets name for service

Deprecated

v1.1.2

Parameters

String

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 59

{"method":"service_name_set","params":"example.com","id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 59
X-Qrator-Auth: aabbccddeeff

{"method":"service_name_set","params":"example.com","id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_name_set","params":"example.com","id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_name_set","params":"example.com","id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_name_set","params":"example.com","id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_name_set","params":"example.com","id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
"example.com"

Service Status

service_status_get

Returns current domain status.

Deprecated

v1.1.2

Parameters

None

Return Values

Enum with value from following list:

  • offline: service is offline
  • online: service is online
  • pending: some operations are performed on the service
  • error: previous operation failed

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52

{"method":"service_status_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff

{"method":"service_status_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39

{"result":"online","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_status_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_status_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"online","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_status_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_status_get","params":null,"id":1}'
Copy
{"result":"online","error":null,"id":1}
Copy
{
    "result": "online",
    "error": null,
    "id": 1
}
Copy
null

status_get

Returns current resource status.

Replacement for domain_status_get and service_status_get methods

Parameters

None

Return Values

Enum with value from following list:

  • offline: domain is offline
  • online: domain is online
  • pending: some operations are performed on the domain
  • error: previous operation failed

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 44

{"method":"status_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 44
X-Qrator-Auth: aabbccddeeff

{"method":"status_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39

{"result":"online","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"online","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"status_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"status_get","params":null,"id":1}'
Copy
{"result":"online","error":null,"id":1}
Copy
{
    "result": "online",
    "error": null,
    "id": 1
}
Copy
null

Service IP

service_ip_get

Returns current upstream IPs.

Added

v1.0.11

Parameters

None

Return Values

IPList

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48

{"method":"service_ip_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
X-Qrator-Auth: aabbccddeeff

{"method":"service_ip_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ip_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ip_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ip_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ip_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "error": null,
    "id": 1
}
Copy
null

service_ip_set

Sets service's upstream IPs..

Added

v1.0.11

Parameters

IPList

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 79

{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 79
X-Qrator-Auth: aabbccddeeff

{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ip_set","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    [
        "198.51.100.12",
        720
    ]
]

service_ip_test

Test given IP addresses to be valid IPList.

Added

v1.0.11

Parameters

IPList

Return Values

IPList

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 74

{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 74
X-Qrator-Auth: aabbccddeeff

{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 60

{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        "198.51.100.12"
    ],
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

Service Ports

service_ports_get

Returns current upstream ports.

Added

v1.0.11

Parameters

None

Return Values

ServicePorts

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51

{"method":"service_ports_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff

{"method":"service_ports_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93

{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ports_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ports_get","params":null,"id":1}' --quiet -O -
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ports_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ports_get","params":null,"id":1}'
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
{
    "result": {
        "22": [
            "tcp"
        ],
        "53": [
            "tcp",
            "udp"
        ],
        "80": [
            "http"
        ],
        "443": [
            "http"
        ]
    },
    "error": null,
    "id": 1
}
Copy
null

service_ports_set

Sets service's upstream ports.

Added

v1.0.11

Parameters

ServicePorts

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 109

{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 109
X-Qrator-Auth: aabbccddeeff

{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
{
    "80": [
        "http"
    ],
    "443": [
        "http"
    ],
    "53": [
        "tcp",
        "udp"
    ],
    "22": [
        "tcp"
    ]
}

service_ports_test

Tests given ServicePorts set to be valid.

Added

v1.0.11

Parameters

ServicePorts

Return Values

ServicePorts

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 110

{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 110
X-Qrator-Auth: aabbccddeeff

{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93

{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}' --quiet -O -
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}'
Copy
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
Copy
{
    "result": {
        "22": [
            "tcp"
        ],
        "53": [
            "tcp",
            "udp"
        ],
        "80": [
            "http"
        ],
        "443": [
            "http"
        ]
    },
    "error": null,
    "id": 1
}
Copy
{
    "80": [
        "http"
    ],
    "443": [
        "http"
    ],
    "53": [
        "tcp",
        "udp"
    ],
    "22": [
        "tcp"
    ]
}

Whitelist

whitelist_append

Added given IP addresses to whitelist.

Parameters

IPList or TimedIPList

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81

{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    [
        "198.51.100.12",
        720
    ]
]

whitelist_get

Returns whitelist contents.

Parameters

None

Return Values

IPList or TimedIPList

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47

{"method":"whitelist_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "error": null,
    "id": 1
}
Copy
null

whitelist_remove

Removes given IP addresses from whitelist.

Parameters

IPList

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75

{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75
X-Qrator-Auth: aabbccddeeff

{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

Blacklist

blacklist_append

Added given IP addresses to blacklist.

Parameters

IPList or TimedIPList

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81

{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 81
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    [
        "198.51.100.12",
        720
    ]
]

blacklist_check

Checks if given IP address is blacklisted or not.

Parameters

IP

Return Values

Enum with value from following list:

  • Banned: given IP address is blacklisted
  • NotBanned: given IP address is not blacklisted

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_check","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

blacklist_flush

Removes from blacklist all IP addresses, that been added using Qrator API

Parameters

None

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49

{"method":"blacklist_flush","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_flush","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_flush","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_flush","params":null,"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
null

blacklist_get

Returns blacklist contents.

Parameters

None

Return Values

TimedIPList

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47

{"method":"blacklist_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 47
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_get","params":null,"id":1}' --quiet -O -
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_get","params":null,"id":1}'
Copy
{"result":["192.0.2.1",["198.51.100.12",720]],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        [
            "198.51.100.12",
            720
        ]
    ],
    "error": null,
    "id": 1
}
Copy
null

blacklist_remove

Removes given IP addresses from blacklist.

Parameters

IPList

Return Values

RequestSuccess

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75

{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 75
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43

{"result":"Successful","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"Successful","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "192.0.2.1",
    "198.51.100.12"
]

blacklist_status

Checks if given IP address is blacklisted or not, if it is - return reason.

Parameters

IP

Return Values

Enum with value from following list:

  • NotBanned: IP address is not blacklisted by Qrator, API, client or WAF
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 63
X-Qrator-Auth: aabbccddeeff

{"method":"blacklist_status","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

Statistics

statistics_billable

Returns billable traffic (Mbps) for given month.

This method uses new staticstics storage (same as personal cabinet)

Added

v1.1.2

Parameters

Month or NULL (for current month)

Return Values

Number

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53

{"method":"statistics_billable","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_billable","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":12,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
Copy
{"result":12,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_billable","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_billable","params":null,"id":1}'
Copy
{"result":12,"error":null,"id":1}
Copy
{
    "result": 12,
    "error": null,
    "id": 1
}
Copy
null

statistics_current_http

Returns lastest HTTP-staticstics snapshot.

This method uses new statistics storage (same as personal cabinet)

Parameters

None

Return Values

StatisticsCurrentHTTP

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57

{"method":"statistics_current_http","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_current_http","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 249

{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_http","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_current_http","params":null,"id":1}'
Copy
{"result":{"time":1563204000,"requests":0,"responses":{"0000_0200":0,"0200_0500":0,"0500_0700":0,"0700_1000":0,"1000_1500":0,"1500_2000":0,"2000_5000":0,"5000_inf":0},"errors":{"total":0,"500":0,"501":0,"502":0,"503":0,"504":0}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1563204000,
        "requests": 0,
        "responses": {
            "0000_0200": 0,
            "0200_0500": 0,
            "0500_0700": 0,
            "0700_1000": 0,
            "1000_1500": 0,
            "1500_2000": 0,
            "2000_5000": 0,
            "5000_inf": 0
        },
        "errors": {
            "total": 0,
            "500": 0,
            "501": 0,
            "502": 0,
            "503": 0,
            "504": 0
        }
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_current_ip

Returns lastest IP-staticstics snapshot.

This method uses new statistics storage (same as personal cabinet)

Parameters

None

Return Values

StatisticsCurrentIP

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55

{"method":"statistics_current_ip","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_current_ip","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 181

{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_ip","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_current_ip","params":null,"id":1}'
Copy
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1563204000,
        "bandwidth": {
            "input": 0,
            "passed": 0,
            "output": 0
        },
        "packets": {
            "input": 0,
            "passed": 0,
            "output": 0
        },
        "blacklist": {
            "qrator": 0,
            "api": 0,
            "waf": 0
        }
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_get

Returns latest statistics snapshot.

This method uses legacy statistics storage use statistics_current_ip, statistics_current_http, statistics_billable methods.

Deprecated

v1.1.2

Parameters

None

Return Values

StatisticsResponse

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48

{"method":"statistics_get","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_get","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 310

{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_get","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_get","params":null,"id":1}'
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1},"billable":0},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1469998800,
        "bsend": 0,
        "brecv": 0,
        "bout": 0,
        "psend": 0,
        "precv": 0,
        "reqspeed": 0,
        "reqlonger10s": 0,
        "reqlonger07s": 0,
        "reqlonger05s": 0,
        "reqlonger02s": 0,
        "reqall": 0,
        "err50x": 0,
        "err501": 0,
        "err502": 0,
        "err503": 0,
        "err504": 0,
        "ban": 0,
        "ban_api": 0,
        "ban_waf": 0,
        "ban_geo": {
            "RU": 1
        },
        "billable": 0
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_get_lite

Returns latest lite statistics (without "billable") snapshot.

This method uses legacy statistics storage use statistics_current_ip and statistics_current_http methods.

Deprecated

v1.1.2

Parameters

None

Return Values

StatisticsResponseLite

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53

{"method":"statistics_get_lite","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff

{"method":"statistics_get_lite","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 297

{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_get_lite","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"statistics_get_lite","params":null,"id":1}'
Copy
{"result":{"time":1469998800,"bsend":0,"brecv":0,"bout":0,"psend":0,"precv":0,"reqspeed":0,"reqlonger10s":0,"reqlonger07s":0,"reqlonger05s":0,"reqlonger02s":0,"reqall":0,"err50x":0,"err501":0,"err502":0,"err503":0,"err504":0,"ban":0,"ban_api":0,"ban_waf":0,"ban_geo":{"RU":1}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1469998800,
        "bsend": 0,
        "brecv": 0,
        "bout": 0,
        "psend": 0,
        "precv": 0,
        "reqspeed": 0,
        "reqlonger10s": 0,
        "reqlonger07s": 0,
        "reqlonger05s": 0,
        "reqlonger02s": 0,
        "reqall": 0,
        "err50x": 0,
        "err501": 0,
        "err502": 0,
        "err503": 0,
        "err504": 0,
        "ban": 0,
        "ban_api": 0,
        "ban_waf": 0,
        "ban_geo": {
            "RU": 1
        }
    },
    "error": null,
    "id": 1
}
Copy
null

Troubleshoot

ip_status

Checks status of given IP address.

Added

v1.0.7

Parameters

IP

Return Values

Enum with value from following list:

  • Upstream: IP address is one of the upstreams IPs
  • Whitelisted: IP address is whitelisted
  • Banned: IP address is blacklisted by Qrator
  • API: IP address is blacklisted by client using Qrator API
  • HTTP: IP address is blacklisted by client using HTTP code (456)
  • WAF: IP address is blacklisted by WAF
  • NotBanned: IP address is is neither upstream nor the whitelisted, nor the blacklisted

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56

{"method":"ip_status","params":["198.51.100.12"],"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
X-Qrator-Auth: aabbccddeeff

{"method":"ip_status","params":["198.51.100.12"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42

{"result":"NotBanned","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
Copy
{"result":"NotBanned","error":null,"id":1}
Copy
{
    "result": "NotBanned",
    "error": null,
    "id": 1
}
Copy
[
    "198.51.100.12"
]

ping

Dummy method used to check that your request is OK and API is sane.

Parameters

None

Return Values

String "pong"

Example

Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38

{"method":"ping","params":null,"id":1}
Copy
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
X-Qrator-Auth: aabbccddeeff

{"method":"ping","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37

{"result":"pong","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' --header='X-Qrator-Auth: aabbccddeeff'
  --post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
Copy
{"result":"pong","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H 'X-Qrator-Auth: aabbccddeeff' \
  --data '{"method":"ping","params":null,"id":1}'
Copy
{"result":"pong","error":null,"id":1}
Copy
{
    "result": "pong",
    "error": null,
    "id": 1
}
Copy
null

Support

If already you are Qrator client - please use ticket system at personal dashboard.

Otherwise feel free to contact our support via mail support@qrator.net

Changelog

1.1.3

Aug 02 2019

1.1.2

Jul 24 2019

  • Major backend updates, fixes and some refactoring:

Added

Deprecated

Removed

  • Removed method domain::test_iplist
  • Removed method domain::test_timediplist
  • Removed method service::test_iplist
  • Removed method service::test_timediplist

1.0.27

Jun 25 2019

    Removed

    • Removed method domain::whitequeue_append
    • Removed method domain::whitequeue_flush
    • Removed method domain::whitequeue_get
    • Removed method domain::whitequeue_get_max_size
    • Removed method domain::whitequeue_get_size
    • Removed method domain::whitequeue_remove
    • Removed method domain::whitequeue_set_max_size

    1.0.26

    Jun 10 2019

    • Minor updates of request handler

    1.0.25

    May 30 2019

    • Documentation fixes

    1.0.24

    May 29 2019

    • Minor fixes

    1.0.23

    May 29 2019

    • Some documentation fixes

    1.0.22

    Apr 16 2019

    • Minor backend updates

    1.0.21

    Feb 14 2019

    • Major improvements for blacklist_... methods

    1.0.20

    Dec 18 2018

    • Minor backend updates

    1.0.19

    Sep 12 2018

      Added

      1.0.18

      Mar 01 2018

      • Minor backend updates

      1.0.17

      Feb 27 2018

        Added

        1.0.16

        Feb 14 2018

          Added

          1.0.15

          Dec 4 2017

            Added

            1.0.14

            Oct 9 2017

              Added

              1.0.13

              Aug 16 2017

                Added

                1.0.12

                Jun 28 2017

                • We are planning to drop support for HTTP requests in favour of HTTPS, please update your applications.

                Added

                1.0.11

                Jun 27 2017

                  Added

                  1.0.10

                  Apr 19 2017

                    Added

                    1.0.9

                    Apr 11 2017

                      Added

                      1.0.8

                      Feb 01 2017

                        Added

                        1.0.7

                        Dec 23 2016

                          Added

                          1.0.6

                          Dec 07 2016

                            Added

                            1.0.5

                            Nov 17 2016

                              Added

                              1.0.4

                              Sep 20 2016

                                Added

                                1.0.3

                                Aug 10 2016

                                  Added

                                  1.0.2

                                  Aug 2 2016

                                    Added