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.

Transport

Staring for October 1st 2019 all API-calls should be made via HTTPS.

Any plain-TCP HTTP API-call will result to HTTP 426 response (response details).

Version

Current version of Qrator API is v1.2.6

Qrator API retains backward compatibility with all previous versions.

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

AccessPolicy

Added in v1.1.8

String representation of policy status:

  • accept - traffic from not-whitelied IP will be accepted;
  • drop - traffic from not-whitelied IP will be dropped.

Default policy is accept.

Certificate

Added in v1.2.1

Processed and ready to use certificate (with private key).

{
    "id": 320,
    "type": "upload",
    "not_valid_before": 1481545141,
    "not_valid_after": 1607775541,
    "autoupdate": null,
    "domain_id": null,
    "hostnames": [
        "*.example.com",
        "example.com"
    ],
    "protect_key": false,
    "certificates": [
        {
            "type": "rsa",
            "cert": "# Subject: /OU=Domain Control Validated/CN=*.example.com\n# Domains: *.example.com, example.com\n# Algo: RSA, key size: 2048\n# Issuer: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2\n# Not valid before: 2016-12-12T12:19:01Z\n# Not valid after: 2020-12-12T12:19:01Z\n# SHA-1 Fingerprint: C2:30:F7:C1:69:79:1E:1C:56:26:31:E8:ED:D8:AB:E1:FE:06:EC:F7\n# SHA-256 Fingerprint: A7:C7:17:68:96:F1:AB:81:B4:FF:C3:5C:48:20:D2:80:D6:D5:01:21:29:89:9A:60:E2:3F:4A:D1:E2:72:05:FB\n-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----\n",
            "key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"
        }
    ],
    "links": [
        {
            "link_id": 1102,
            "port": 443,
            "hostname": "*.example.com",
            "domain_id": 1,
            "certificate": 320
        },
        {
            "link_id": 1101,
            "port": 443,
            "hostname": "example.com",
            "domain_id": 1,
            "certificate": 320
        },
        {
            "link_id": 1100,
            "port": 443,
            "hostname": null,
            "domain_id": 1,
            "certificate": 320
        }
    ]
}

type is a Enumwith value from following list:

  • upload: Certificate was uploaded via Personal Dashboard or via API
  • letsencrypt: Certificate was created by Qrator via Let's Encrypt

Let's Encrypt certificates only:

  • autoupdate - shows if Qrator will try to renew and update certificate as soon as possible by Let's Encrypt rules.
  • domain_id - shows which Qrator domain was used to issue certificate.

Upload certificates will have these properties with NULL value.

protect_key show that private key is protected and wouldn't be show at Personal Dashboard or API.

certificates list of certificate-key pairs (PEM formatted) divided by hashing algorithm.

For example - for all Let's Encrypt certificates we use 2 certificate chains (RSA and EC) to maximize security and compatibility.

For certificates with protected keys (protect_key): key property will have special value <<<protected>>>

Added in v1.2.1

Object representing a link of domain_id-port-hostname-certificate (minimal SNI part).

{
    "link_id": 1101,
    "port": 443,
    "hostname": "example.com",
    "domain_id": 1,
    "certificate": 320
}

hostname can have a NULL value in this case it represents a default hostname.

Added in v1.2.1

List of CertificateLink

[
    {
        "link_id": 1100,
        "port": 443,
        "hostname": null,
        "domain_id": 1,
        "certificate": 320
    },
    {
        "link_id": 1101,
        "port": 443,
        "hostname": "example.com",
        "domain_id": 1,
        "certificate": 320
    },
    {
        "link_id": 1102,
        "port": 443,
        "hostname": "*.example.com",
        "domain_id": 1,
        "certificate": 320
    }
]

CertificateList

Added in v1.2.1

List of Certificate

CertificateRequest

Added in v1.2.1

Entity that represents request for adding PEM to Certificate Storage

{
    "id": 333,
    "type": "upload",
    "created": 1600941096,
    "status": "done",
    "domain_id": null,
    "hostnames": null,
    "result": {
        "chains": [
            {
                "chain_key": "A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                "chain_id": 1,
                "not_valid_before": "2019-09-18T15:03:30Z",
                "not_valid_after": "2019-12-17T15:03:30Z",
                "subject": "/CN=example.com",
                "sha1": "BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA",
                "sha256": "AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                "private_key_type": "RSA",
                "private_key_size": 2048,
                "is_trusted_ca": true,
                "is_self_signed": false,
                "is_outdated": true,
                "is_future": false,
                "details": [
                    {
                        "subject": "/CN=example.com",
                        "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                        "not_valid_before": "2019-09-18T15:03:30Z",
                        "not_valid_after": "2019-12-17T15:03:30Z"
                    },
                    {
                        "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                        "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "not_valid_before": "2016-03-17T16:40:46Z",
                        "not_valid_after": "2021-03-17T16:40:46Z"
                    },
                    {
                        "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "not_valid_before": "2000-09-30T21:12:19Z",
                        "not_valid_after": "2021-09-30T14:01:15Z"
                    }
                ]
            },
            {
                "chain_key": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                "chain_id": 1,
                "not_valid_before": "2019-04-08T20:19:21Z",
                "not_valid_after": "2019-07-07T20:19:21Z",
                "subject": "/CN=example.com",
                "sha1": "FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF",
                "sha256": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                "private_key_type": "RSA",
                "private_key_size": 2048,
                "is_trusted_ca": true,
                "is_self_signed": false,
                "is_outdated": true,
                "is_future": false,
                "details": [
                    {
                        "subject": "/CN=example.com",
                        "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                        "not_valid_before": "2019-04-08T20:19:21Z",
                        "not_valid_after": "2019-07-07T20:19:21Z"
                    },
                    {
                        "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                        "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "not_valid_before": "2016-03-17T16:40:46Z",
                        "not_valid_after": "2021-03-17T16:40:46Z"
                    },
                    {
                        "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                        "not_valid_before": "2000-09-30T21:12:19Z",
                        "not_valid_after": "2021-09-30T14:01:15Z"
                    }
                ]
            }
        ],
        "file_errors": [],
        "errors": null,
        "domain_errors": null
    }
}

type is a Enumwith value from following list:

  • upload: Certificate was uploaded via Personal Dashboard or via API
  • letsencrypt: Certificate was created by Qrator via Let's Encrypt

status is a Enumwith value from following list:

  • new: unprocessed request you need to wait a bit
  • done: certificate request is processed with out errors and ready to be add to Certificate Storage
  • error: certificate request is processed with errors, take a look at result.error property

Usually it take <1 minute to process upload certificate request and approx. 15 minues to process letsencrypt certificate request

Let's Encrypt certificate requests only:

  • domain_id - shows which Qrator domain was used to issue certificate
  • hostnames - list of hostnames should be used as CN and SAN fields of certificate

Upload certificate requests will have these properties with NULL value.

result.chains is a list of certificate-chains that found in uploaded PEM's or in issued certificate

CertificateRequestList

Added in v1.2.1

List of CertificateRequest

ContactList

Added in v1.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 v1.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 v1.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 v1.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 v1.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 v1.0.11

String representation of service protocol, current supported protocols:

  • http
  • tcp
  • udp
  • udp
  • dns

StatisticsCurrentBlocks

Added in v1.2.2

Object for blocks made by Qrator.Antibot or WAF

{
    "result": {
        "time": 1606828607, // timestamp for snapshot
        "Qrator401": 28.2,  // number of requests, intercepted by Antibot with js-challenge
        "Qrator403": 0.3,   // number of requests blocked by Qrator (inc. Antibot)
        "Waf403": 0.13      // number of requests blocked by WAF
    },
    "error": null,
    "id: 1
}

values are nullable float, null is used in cases when client doesn't have Antibot/WAF services

StatisticsCurrentHTTP

Added in v1.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 v1.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
}

StatisticsCurrentLocations

Added in v1.2.2

Object for Geo-locations of IPs in blacklist

{
    "result": {
        "time": 1606828607, // timestamp for snapshot
        "locations": {      // ISO 3166-1 alpha-2
            "A1": 341.5,
            "RU": 65.3,
            "ID": 49,
            "US": 27,
            "BR": 26
        }
    },
    "error": null,
    "id: 1
}

values are float and they represent "average count for last minute"

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 v1.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 v1.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 v1.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-Request-Id: d12...6ce // id for your request (string, hash)
X-Qrator-API-IP: 192.0.2.1     // calling (your) IP address (string)
X-Qrator-API-HTTPS: yes        // call via HTTPS  (string: yes | no)
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)
X-Qrator-API-Auth: token       // auth type used (string: token | ip)

<response body>

Also API response could have X-Qrator-API-Error-Details header, it may add some details about error.

Transport errors

HTTP 426 Upgrade Required

This error occurs for any API call requested via plain HTTP.

You should use HTTPS connection to resolve this error, see Transport for details.

Example of response (for HTTP request):

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

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

HTTP/1.1 426 Upgrade Required
Server: QRATOR
Content-Type: application/json
Content-Length: 133
Connection: close
X-Qrator-API-Version: 1.1.4
X-Qrator-API-Mode: debug
X-Qrator-API-IP: 192.0.2.1
X-Qrator-API-HTTPS: no
X-Qrator-API-SRV: fail
Upgrade: TLS/1.3, HTTP/1.1
X-Qrator-API-Error-Details: HTTP transport exception

Usage of plain TCP for API calls is forbidden.
You should use HTTPS as transport.
See https://api.qrator.net/#transport for details.

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, invalid port definitions will be removed.

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: 141

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

{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"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"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"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"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"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"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"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"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"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"
    ],
    "444": [
        "ntp"
    ],
    "53": [
        "tcp",
        "udp"
    ],
    "22": [
        "tcp"
    ],
    "65536": [
        "http"
    ]
}

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: 649

{"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}
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":["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}
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":["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}
Copy
{
    "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
}
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

Certificate storage

certificate_list

Returns list of your certificates.

Added

v1.2.1

Parameters

None

Return Values

CertificateList

Example

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

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

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

{"result":[{"id":320,"type":"upload","not_valid_before":1481545141,"not_valid_after":1607775541,"autoupdate":null,"domain_id":null,"hostnames":["*.example.com","example.com"],"protect_key":false,"certificates":[{"type":"rsa","cert":"# Subject: /OU=Domain Control Validated/CN=*.example.com\n# Domains: *.example.com, example.com\n# Algo: RSA, key size: 2048\n# Issuer: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2\n# Not valid before: 2016-12-12T12:19:01Z\n# Not valid after: 2020-12-12T12:19:01Z\n# SHA-1 Fingerprint: C2:30:F7:C1:69:79:1E:1C:56:26:31:E8:ED:D8:AB:E1:FE:06:EC:F7\n# SHA-256 Fingerprint: A7:C7:17:68:96:F1:AB:81:B4:FF:C3:5C:48:20:D2:80:D6:D5:01:21:29:89:9A:60:E2:3F:4A:D1:E2:72:05:FB\n-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----\n","key":"-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"}],"links":[{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320}]}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"certificate_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":"certificate_list","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"id":320,"type":"upload","not_valid_before":1481545141,"not_valid_after":1607775541,"autoupdate":null,"domain_id":null,"hostnames":["*.example.com","example.com"],"protect_key":false,"certificates":[{"type":"rsa","cert":"# Subject: /OU=Domain Control Validated/CN=*.example.com\n# Domains: *.example.com, example.com\n# Algo: RSA, key size: 2048\n# Issuer: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2\n# Not valid before: 2016-12-12T12:19:01Z\n# Not valid after: 2020-12-12T12:19:01Z\n# SHA-1 Fingerprint: C2:30:F7:C1:69:79:1E:1C:56:26:31:E8:ED:D8:AB:E1:FE:06:EC:F7\n# SHA-256 Fingerprint: A7:C7:17:68:96:F1:AB:81:B4:FF:C3:5C:48:20:D2:80:D6:D5:01:21:29:89:9A:60:E2:3F:4A:D1:E2:72:05:FB\n-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----\n","key":"-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"}],"links":[{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320}]}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"certificate_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":"certificate_list","params":null,"id":1}'
Copy
{"result":[{"id":320,"type":"upload","not_valid_before":1481545141,"not_valid_after":1607775541,"autoupdate":null,"domain_id":null,"hostnames":["*.example.com","example.com"],"protect_key":false,"certificates":[{"type":"rsa","cert":"# Subject: /OU=Domain Control Validated/CN=*.example.com\n# Domains: *.example.com, example.com\n# Algo: RSA, key size: 2048\n# Issuer: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2\n# Not valid before: 2016-12-12T12:19:01Z\n# Not valid after: 2020-12-12T12:19:01Z\n# SHA-1 Fingerprint: C2:30:F7:C1:69:79:1E:1C:56:26:31:E8:ED:D8:AB:E1:FE:06:EC:F7\n# SHA-256 Fingerprint: A7:C7:17:68:96:F1:AB:81:B4:FF:C3:5C:48:20:D2:80:D6:D5:01:21:29:89:9A:60:E2:3F:4A:D1:E2:72:05:FB\n-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----\n","key":"-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"}],"links":[{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320}]}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "id": 320,
            "type": "upload",
            "not_valid_before": 1481545141,
            "not_valid_after": 1607775541,
            "autoupdate": null,
            "domain_id": null,
            "hostnames": [
                "*.example.com",
                "example.com"
            ],
            "protect_key": false,
            "certificates": [
                {
                    "type": "rsa",
                    "cert": "# Subject: /OU=Domain Control Validated/CN=*.example.com\n# Domains: *.example.com, example.com\n# Algo: RSA, key size: 2048\n# Issuer: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2\n# Not valid before: 2016-12-12T12:19:01Z\n# Not valid after: 2020-12-12T12:19:01Z\n# SHA-1 Fingerprint: C2:30:F7:C1:69:79:1E:1C:56:26:31:E8:ED:D8:AB:E1:FE:06:EC:F7\n# SHA-256 Fingerprint: A7:C7:17:68:96:F1:AB:81:B4:FF:C3:5C:48:20:D2:80:D6:D5:01:21:29:89:9A:60:E2:3F:4A:D1:E2:72:05:FB\n-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----\n",
                    "key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"
                }
            ],
            "links": [
                {
                    "link_id": 1102,
                    "port": 443,
                    "hostname": "*.example.com",
                    "domain_id": 1,
                    "certificate": 320
                },
                {
                    "link_id": 1101,
                    "port": 443,
                    "hostname": "example.com",
                    "domain_id": 1,
                    "certificate": 320
                },
                {
                    "link_id": 1100,
                    "port": 443,
                    "hostname": null,
                    "domain_id": 1,
                    "certificate": 320
                }
            ]
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

certrequest_install

Install one certificate-chain from processed certificate request to your Certificate storage.

Added

v1.2.1

Parameters

Number certificate request id, String Chain key, Number Chain Id

Return Values

Number certificate Id

Example

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

{"method":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 154
X-Qrator-Auth: aabbccddeeff

{"method":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35

{"result":1104,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"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":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"id":1}' --quiet -O -
Copy
{"result":1104,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
  --data '{"method":"certrequest_install","params":[334,"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",1],"id":1}'
Copy
{"result":1104,"error":null,"id":1}
Copy
{
    "result": 1104,
    "error": null,
    "id": 1
}
Copy
[
    334,
    "A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
    1
]

certrequest_list

Returns list of your certificate requests.

Added

v1.2.1

Parameters

None

Return Values

CertificateRequestList

Example

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

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

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

{"result":[{"id":333,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},{"id":334,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"certrequest_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":"certrequest_list","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"id":333,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},{"id":334,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"certrequest_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":"certrequest_list","params":null,"id":1}'
Copy
{"result":[{"id":333,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},{"id":334,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "id": 333,
            "type": "upload",
            "created": 1600941096,
            "status": "done",
            "domain_id": null,
            "hostnames": null,
            "result": {
                "chains": [
                    {
                        "chain_key": "A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                        "chain_id": 1,
                        "not_valid_before": "2019-09-18T15:03:30Z",
                        "not_valid_after": "2019-12-17T15:03:30Z",
                        "subject": "/CN=example.com",
                        "sha1": "BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA",
                        "sha256": "AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                        "private_key_type": "RSA",
                        "private_key_size": 2048,
                        "is_trusted_ca": true,
                        "is_self_signed": false,
                        "is_outdated": true,
                        "is_future": false,
                        "details": [
                            {
                                "subject": "/CN=example.com",
                                "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "not_valid_before": "2019-09-18T15:03:30Z",
                                "not_valid_after": "2019-12-17T15:03:30Z"
                            },
                            {
                                "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2016-03-17T16:40:46Z",
                                "not_valid_after": "2021-03-17T16:40:46Z"
                            },
                            {
                                "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2000-09-30T21:12:19Z",
                                "not_valid_after": "2021-09-30T14:01:15Z"
                            }
                        ]
                    },
                    {
                        "chain_key": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                        "chain_id": 1,
                        "not_valid_before": "2019-04-08T20:19:21Z",
                        "not_valid_after": "2019-07-07T20:19:21Z",
                        "subject": "/CN=example.com",
                        "sha1": "FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF",
                        "sha256": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                        "private_key_type": "RSA",
                        "private_key_size": 2048,
                        "is_trusted_ca": true,
                        "is_self_signed": false,
                        "is_outdated": true,
                        "is_future": false,
                        "details": [
                            {
                                "subject": "/CN=example.com",
                                "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "not_valid_before": "2019-04-08T20:19:21Z",
                                "not_valid_after": "2019-07-07T20:19:21Z"
                            },
                            {
                                "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2016-03-17T16:40:46Z",
                                "not_valid_after": "2021-03-17T16:40:46Z"
                            },
                            {
                                "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2000-09-30T21:12:19Z",
                                "not_valid_after": "2021-09-30T14:01:15Z"
                            }
                        ]
                    }
                ],
                "file_errors": [],
                "errors": null,
                "domain_errors": null
            }
        },
        {
            "id": 334,
            "type": "upload",
            "created": 1600941096,
            "status": "done",
            "domain_id": null,
            "hostnames": null,
            "result": {
                "chains": [
                    {
                        "chain_key": "A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                        "chain_id": 1,
                        "not_valid_before": "2019-09-18T15:03:30Z",
                        "not_valid_after": "2019-12-17T15:03:30Z",
                        "subject": "/CN=example.com",
                        "sha1": "BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA",
                        "sha256": "AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                        "private_key_type": "RSA",
                        "private_key_size": 2048,
                        "is_trusted_ca": true,
                        "is_self_signed": false,
                        "is_outdated": true,
                        "is_future": false,
                        "details": [
                            {
                                "subject": "/CN=example.com",
                                "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "not_valid_before": "2019-09-18T15:03:30Z",
                                "not_valid_after": "2019-12-17T15:03:30Z"
                            },
                            {
                                "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2016-03-17T16:40:46Z",
                                "not_valid_after": "2021-03-17T16:40:46Z"
                            },
                            {
                                "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2000-09-30T21:12:19Z",
                                "not_valid_after": "2021-09-30T14:01:15Z"
                            }
                        ]
                    },
                    {
                        "chain_key": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                        "chain_id": 1,
                        "not_valid_before": "2019-04-08T20:19:21Z",
                        "not_valid_after": "2019-07-07T20:19:21Z",
                        "subject": "/CN=example.com",
                        "sha1": "FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF",
                        "sha256": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                        "private_key_type": "RSA",
                        "private_key_size": 2048,
                        "is_trusted_ca": true,
                        "is_self_signed": false,
                        "is_outdated": true,
                        "is_future": false,
                        "details": [
                            {
                                "subject": "/CN=example.com",
                                "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "not_valid_before": "2019-04-08T20:19:21Z",
                                "not_valid_after": "2019-07-07T20:19:21Z"
                            },
                            {
                                "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2016-03-17T16:40:46Z",
                                "not_valid_after": "2021-03-17T16:40:46Z"
                            },
                            {
                                "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                                "not_valid_before": "2000-09-30T21:12:19Z",
                                "not_valid_after": "2021-09-30T14:01:15Z"
                            }
                        ]
                    }
                ],
                "file_errors": [],
                "errors": null,
                "domain_errors": null
            }
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

certrequest_remove

Remove certificate request.

Added

v1.2.1

Parameters

Number request id

Return Values

RequestSuccess

Example

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

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

{"method":"certrequest_remove","params":[334],"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":"certrequest_remove","params":[334],"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":"certrequest_remove","params":[334],"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":"certrequest_remove","params":[334],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
  --data '{"method":"certrequest_remove","params":[334],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    334
]

certrequest_upload

Create new certificate request by uploading PEM encoded certificate and private key.

Added

v1.2.1

Parameters

String certificate or chain certificates, String private keys

Return Values

CertificateRequest

Example

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

{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}
Copy
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 305
X-Qrator-Auth: aabbccddeeff

{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2492

{"result":{"id":335,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/client/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"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":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}' --quiet -O -
Copy
{"result":{"id":335,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}'
Copy
$ curl https://api.qrator.net/request/client/1 \
  -H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
  --data '{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}'
Copy
{"result":{"id":335,"type":"upload","created":1600941096,"status":"done","domain_id":null,"hostnames":null,"result":{"chains":[{"chain_key":"A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","chain_id":1,"not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z","subject":"/CN=example.com","sha1":"BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA","sha256":"AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-09-18T15:03:30Z","not_valid_after":"2019-12-17T15:03:30Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]},{"chain_key":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","chain_id":1,"not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z","subject":"/CN=example.com","sha1":"FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF","sha256":"DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB","private_key_type":"RSA","private_key_size":2048,"is_trusted_ca":true,"is_self_signed":false,"is_outdated":true,"is_future":false,"details":[{"subject":"/CN=example.com","issuer":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","not_valid_before":"2019-04-08T20:19:21Z","not_valid_after":"2019-07-07T20:19:21Z"},{"subject":"/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2016-03-17T16:40:46Z","not_valid_after":"2021-03-17T16:40:46Z"},{"subject":"/O=Digital Signature Trust Co./CN=DST Root CA X3","issuer":"/O=Digital Signature Trust Co./CN=DST Root CA X3","not_valid_before":"2000-09-30T21:12:19Z","not_valid_after":"2021-09-30T14:01:15Z"}]}],"file_errors":[],"errors":null,"domain_errors":null}},"error":null,"id":1}
Copy
{
    "result": {
        "id": 335,
        "type": "upload",
        "created": 1600941096,
        "status": "done",
        "domain_id": null,
        "hostnames": null,
        "result": {
            "chains": [
                {
                    "chain_key": "A5:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                    "chain_id": 1,
                    "not_valid_before": "2019-09-18T15:03:30Z",
                    "not_valid_after": "2019-12-17T15:03:30Z",
                    "subject": "/CN=example.com",
                    "sha1": "BF:0D:E9:2B:C0:CA:2E:87:E3:82:9A:12:0C:8C:F1:AF:46:E9:0E:CA",
                    "sha256": "AF:49:6D:09:A5:70:42:85:D3:76:CD:9E:71:4C:B0:24:07:B3:F2:0C:59:04:4B:69:FB:12:93:83:EE:9C:60:D7",
                    "private_key_type": "RSA",
                    "private_key_size": 2048,
                    "is_trusted_ca": true,
                    "is_self_signed": false,
                    "is_outdated": true,
                    "is_future": false,
                    "details": [
                        {
                            "subject": "/CN=example.com",
                            "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                            "not_valid_before": "2019-09-18T15:03:30Z",
                            "not_valid_after": "2019-12-17T15:03:30Z"
                        },
                        {
                            "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                            "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "not_valid_before": "2016-03-17T16:40:46Z",
                            "not_valid_after": "2021-03-17T16:40:46Z"
                        },
                        {
                            "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "not_valid_before": "2000-09-30T21:12:19Z",
                            "not_valid_after": "2021-09-30T14:01:15Z"
                        }
                    ]
                },
                {
                    "chain_key": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                    "chain_id": 1,
                    "not_valid_before": "2019-04-08T20:19:21Z",
                    "not_valid_after": "2019-07-07T20:19:21Z",
                    "subject": "/CN=example.com",
                    "sha1": "FA:B0:E3:47:C5:FB:5F:15:93:75:94:9B:3F:52:F6:DD:66:02:CF:CF",
                    "sha256": "DF:2E:C5:ED:46:3F:56:58:A6:E4:0C:4D:6F:6B:1A:5C:AE:80:1F:BC:79:5D:E8:04:34:A3:22:D4:C8:5C:55:DB",
                    "private_key_type": "RSA",
                    "private_key_size": 2048,
                    "is_trusted_ca": true,
                    "is_self_signed": false,
                    "is_outdated": true,
                    "is_future": false,
                    "details": [
                        {
                            "subject": "/CN=example.com",
                            "issuer": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                            "not_valid_before": "2019-04-08T20:19:21Z",
                            "not_valid_after": "2019-07-07T20:19:21Z"
                        },
                        {
                            "subject": "/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3",
                            "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "not_valid_before": "2016-03-17T16:40:46Z",
                            "not_valid_after": "2021-03-17T16:40:46Z"
                        },
                        {
                            "subject": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "issuer": "/O=Digital Signature Trust Co./CN=DST Root CA X3",
                            "not_valid_before": "2000-09-30T21:12:19Z",
                            "not_valid_after": "2021-09-30T14:01:15Z"
                        }
                    ]
                }
            ],
            "file_errors": [],
            "errors": null,
            "domain_errors": null
        }
    },
    "error": null,
    "id": 1
}
Copy
[
    "-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----",
    "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"
]

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

not_whitelisted_policy_get

Returns current AccessPolicy.

Parameters

None

Return Values

AccessPolicy

Example

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

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

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

{"result":"accept","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"not_whitelisted_policy_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":"not_whitelisted_policy_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"accept","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"not_whitelisted_policy_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":"not_whitelisted_policy_get","params":null,"id":1}'
Copy
{"result":"accept","error":null,"id":1}
Copy
{
    "result": "accept",
    "error": null,
    "id": 1
}
Copy
null

not_whitelisted_policy_set

Sets current AccessPolicy.

Parameters

AccessPolicy

Return Values

RequestSuccess

Example

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

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

{"method":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"id":1}'
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
  --data '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "accept"
]

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.

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: 305

{"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 name just for you"},{"type":"primary","ip":"127.255.255.254","weight":1,"name":"test"}]},"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 name just for you"},{"type":"primary","ip":"127.255.255.254","weight":1,"name":"test"}]},"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 name just for you"},{"type":"primary","ip":"127.255.255.254","weight":1,"name":"test"}]},"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 name just for you"
            },
            {
                "type": "primary",
                "ip": "127.255.255.254",
                "weight": 1,
                "name": "test"
            }
        ]
    },
    "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_count

Returns count of blocked IPs by client (API/Dashboard).

Parameters

None

Return Values

Number

Example

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

{"method":"blacklist_count","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_count","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":10,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_count","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_count","params":null,"id":1}' --quiet -O -
Copy
{"result":10,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_count","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_count","params":null,"id":1}'
Copy
{"result":10,"error":null,"id":1}
Copy
{
    "result": 10,
    "error": null,
    "id": 1
}
Copy
null

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_blocks

Returns current blocks made by Qrator.Antibot or WAF

Added

v1.2.2

Parameters

None

Return Values

StatisticsCurrentBlocks

Example

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

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

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

{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_blocks","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_blocks","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_blocks","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_blocks","params":null,"id":1}'
Copy
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1606828607,
        "Qrator401": 28.2,
        "Qrator403": 0.3,
        "Waf403": 0.13
    },
    "error": null,
    "id": 1
}
Copy
null

statistics_current_http

Returns latest HTTP-statistics 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_current_locations

Return current Geo-locations for IPs blacklist

Added

v1.2.2

Parameters

None

Return Values

StatisticsCurrentLocations

Example

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

{"method":"statistics_current_locations","params":null,"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":"statistics_current_locations","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 109

{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"statistics_current_locations","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_locations","params":null,"id":1}' --quiet -O -
Copy
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"statistics_current_locations","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_locations","params":null,"id":1}'
Copy
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
Copy
{
    "result": {
        "time": 1606828607,
        "locations": {
            "A1": 341.5,
            "RU": 65.3,
            "ID": 49,
            "US": 27,
            "BR": 26
        }
    },
    "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

Certificate storage

sni_get

Get current SNI configuration

Added

v1.2.1

Parameters

None

Return Values

CertificateLinkList

Example

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

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

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

{"result":[{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320}],"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/domain/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"sni_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":"sni_get","params":null,"id":1}' --quiet -O -
Copy
{"result":[{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320}],"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/domain/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"sni_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":"sni_get","params":null,"id":1}'
Copy
{"result":[{"link_id":1100,"port":443,"hostname":null,"domain_id":1,"certificate":320},{"link_id":1101,"port":443,"hostname":"example.com","domain_id":1,"certificate":320},{"link_id":1102,"port":443,"hostname":"*.example.com","domain_id":1,"certificate":320}],"error":null,"id":1}
Copy
{
    "result": [
        {
            "link_id": 1100,
            "port": 443,
            "hostname": null,
            "domain_id": 1,
            "certificate": 320
        },
        {
            "link_id": 1101,
            "port": 443,
            "hostname": "example.com",
            "domain_id": 1,
            "certificate": 320
        },
        {
            "link_id": 1102,
            "port": 443,
            "hostname": "*.example.com",
            "domain_id": 1,
            "certificate": 320
        }
    ],
    "error": null,
    "id": 1
}
Copy
null

Add single SNI certificate-hostname record.

If same link (port-hostname) exists - it will be overwritten

Added

v1.2.1

Parameters

Number port, Number certificate id, String hostname or NULL (for default hostname)

Return Values

CertificateLinkList

Example

Remove single SNI certificate-hostname record.

Added

v1.2.1

Parameters

Number link id

Return Values

CertificateLinkList

Example

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

not_whitelisted_policy_get

Returns current AccessPolicy.

Parameters

None

Return Values

AccessPolicy

Example

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

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

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

{"result":"accept","error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"not_whitelisted_policy_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":"not_whitelisted_policy_get","params":null,"id":1}' --quiet -O -
Copy
{"result":"accept","error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"not_whitelisted_policy_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":"not_whitelisted_policy_get","params":null,"id":1}'
Copy
{"result":"accept","error":null,"id":1}
Copy
{
    "result": "accept",
    "error": null,
    "id": 1
}
Copy
null

not_whitelisted_policy_set

Sets current AccessPolicy.

Parameters

AccessPolicy

Return Values

RequestSuccess

Example

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

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

{"method":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"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":"not_whitelisted_policy_set","params":["accept"],"id":1}'
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
  --data '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}'
Copy
{"result":"Successful","error":null,"id":1}
Copy
{
    "result": "Successful",
    "error": null,
    "id": 1
}
Copy
[
    "accept"
]

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: 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_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"],"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"],"error":null,"id":1}
Copy
{
    "result": [
        "192.0.2.1",
        "198.51.100.12"
    ],
    "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: 73

{"method":"service_ip_set","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: 73
X-Qrator-Auth: aabbccddeeff

{"method":"service_ip_set","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":"service_ip_set","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_set","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":"service_ip_set","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_set","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"
]

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_count

Returns count of blocked IPs by client (API/Dashboard).

Parameters

None

Return Values

Number

Example

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

{"method":"blacklist_count","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_count","params":null,"id":1}
Copy
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33

{"result":10,"error":null,"id":1}
Copy
$ wget https://api.qrator.net/request/service/1 \
  --header='Content-Type: application/json' \
  --post-data '{"method":"blacklist_count","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_count","params":null,"id":1}' --quiet -O -
Copy
{"result":10,"error":null,"id":1}
Copy
$ curl https://api.qrator.net/request/service/1 \
  -H 'Content-Type: application/json' \
  --data '{"method":"blacklist_count","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_count","params":null,"id":1}'
Copy
{"result":10,"error":null,"id":1}
Copy
{
    "result": 10,
    "error": null,
    "id": 1
}
Copy
null

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 -