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.4.7
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-whitelisted IP will be accepted; -
drop
- traffic from not-whitelisted 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 Enum
with 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>>>
CertificateLink
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.
CertificateLinkList
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
CertificateReplace
Added in v1.4.6
Source certificate id and target certificate id to replace it with
{
"source": 100,
"target": 200
}
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 Enum
with 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 Enum
with 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 atresult.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
CertificateSniState
Added in v1.4.1
An array of certificate links (objects) representing SNI-state:
[
{
"port": 443,
"hostname": null, // null stands for default hostname
"certificate": 420 // ID of certificate
},
{
"port": 443,
"hostname": "example.com",
"certificate": 420
},
{
"port": 443,
"hostname": "www.example.com",
"certificate": 421
}
]
To be valid state should follow rules:
- has link for default hostname (
null
), with one exception - empty state; - there must NOT be any links with the same hostname (no duplicates);
- maximum number of links in state is 1000 links;
- (currently) only
port: 443
is supported.
Contact
Added in v1.3.13
Single contact registered at Qrator personal dashboard
{
"id": 1,
"email": "john@example.com",
"first_name": "John",
"middle_name": "Random",
"last_name": "User",
"master_contact": true,
"role": {
"technical": false,
"finance": true,
"administrative": true
},
"2fa_enabled": true,
"lang": "en",
"report_lang": "en",
"policy_groups": [
1,
2,
3
]
}
ContactCreateObject
Added in v1.3.13
Structure to describe new contact data, used by contact_create
{
"email": "john@example.com",
"first_name": "John",
"middle_name": "Smith",
"last_name": "Random",
"lang": "en",
"report_lang": "en",
"password": "my5ecu4ePassw0rd",
"roles": [
"technical",
"finance",
"administrative"
],
"send_password_reset": true,
"policy_groups": [
1,
2,
3
]
}
-
email
is required and should be a valid email. -
first_name
is required. -
middle_name
is optional. -
last_name
is required. -
lang
is required,enum("en", "ru")
, default -"en"
. -
report_lang
is required,enum("en", "ru", "disable")
, default -"disable"
. -
password
is optional. -
roles
is required,array
orenum("technical", "finance", "administrative")
-
send_password_reset
is optional,boolean
, default -true
, should we send notification to user? -
policy_groups
array of policy group ids user belongs to
Field roles
can be used in one of two forms:
Array of enums
"roles": [
"finance",
"administrative"
]
Dict with "enabled" flags, like in Contact
"roles": [
"technical": false,
"finance": true,
"administrative": true
]
This couple of examples shows same set of roles (finance+administrative).
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",
"master_contact": true,
"role": {
"technical": false,
"finance": true,
"administrative": true
},
"2fa_enabled": true,
"lang": "en",
"report_lang": "en",
"policy_groups": [
1,
2,
3
]
}
]
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
}
IPPort
Added in v1.4.4
IPv4 address, for example: "192.0.2.1"
and port, for example: 80
{
"method": "method_name",
"params": [
"192.0.2.1",
80
],
"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.
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 ;)
PolicyGroupList
Added in v1.4.3
List of policy groups
[
{
"id": 1,
"name": "Policy group name"
}
]
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, Qrator.Antibot or WAF
{
"result": {
"time": 1606828607, // timestamp for snapshot
"Qrator401": 28.2, // request rate (rps), intercepted by Antibot with js-challenge
"Qrator403": 0.3, // request rate (rps), blocked by Qrator (inc. Antibot)
"Waf403": 0.13, // request rate (rps), blocked by WAF
"Qrator503Con": 32.44, // request rate (rps), blocked by Qrator
"Qrator503Req": 40.28 // request rate (rps), blocked by Qrator
},
"error": null,
"id: 1
}
values are nullable float
, null
is used in cases when client doesn't have Antibot/WAF services
StatisticsCurrentDNS
Added in v1.3.1
Object, representing latest statistics snapshot for DNS-metrics
{
"result": {
"time": 1563204000, // timestamp for snapshot
"cache": {
"hit": 0,
},
"requests": {
"upstream": 0,
"invalid": 0,
"types": {
"A": 0, // requests rate (rps), type A
"AAAA": 0, // requests rate (rps), type AAAA
"ANY": 0, // requests rate (rps), type ANY
"CNAME": 0, // requests rate (rps), type CNAME
"NS": 0, // requests rate (rps), type NS
"SOA": 0, // requests rate (rps), type SOA
"TXT": 0 // requests rate (rps), type TXT
},
"protocol": {
"tcp": 0, // requests rate (rps), protocol TCP
"udp": 0 // requests rate (rps), protocol UDP
}
},
"errors_user": {
"NXDOMAIN": 0, // errors rate (rps), Connect
"SERVFAIL": 0, // errors rate (rps), Connect
},
"errors_upstream": {
"Connect": 0, // errors rate (rps), Connect
"Recv": 0, // errors rate (rps), Connect
"Send": 0, // errors rate (rps), Connect
"Timeout": 0 // errors rate (rps), Timeout
}
},
"error": null,
"id: 1
}
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 (rps), duration 0.0-0.2s
"0200_0500": 0, // responses rate (rps), duration 0.2-0.5s
"0500_0700": 0, // responses rate (rps), duration 0.5-0.7s
"0700_1000": 0, // responses rate (rps), duration 0.7-1.0s
"1000_1500": 0, // responses rate (rps), duration 1.0-1.5s
"1500_2000": 0, // responses rate (rps), duration 1.5-2.0s
"2000_5000": 0, // responses rate (rps), duration 2.0-5.0s
"5000_inf": 0 // responses rate (rps), duration over 5s
},
"errors": {
"total": 0, // errors rate (rps), total (5xx)
"500": 0, // errors rate (rps), HTTP-500
"501": 0, // errors rate (rps), HTTP-501
"502": 0, // errors rate (rps), HTTP-502
"503": 0, // errors rate (rps), HTTP-503
"504": 0, // errors rate (rps), HTTP-504
"4xx": 0 // errors rate (rps), HTTP-400..499
}
},
"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 or null
"custom": 0 // number of IPs banned by custom-rules or null
}
},
"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
and some other.
{
"result": "pong",
"error": null,
"id": 1
}
StringList
Added in v1.2.8
List of Strings
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
Since v1.3.0 TimedIP
in some cases could contain comment (see TimedIpMode
) and has form:
[
"192.0.2.1",
300,
"some comment"
]
Each method that uses this form (ex. blacklist_get
/blacklist_append
) will have appropriate notice.
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
}
TimedIpMode
Added in v1.3.0
Feature flag to switch mode for TimedIpList
handling:
-
legacy
- only basic forms:- only IP:
"192.0.2.1"
- IP and timeout:
["192.0.2.1", 300]
- only IP:
-
tuple
- same aslegacy
with extra form (as of v1.3.0):- IP, timeout and comment:
["192.0.2.1", 300, "comment"]
- IP, timeout and comment:
In most cases default value is legacy
.
Trace
Added in v1.4.4
Result of troubleshoot_traceroute
method
[
{
"source": "192.0.2.1", // trace source
"status_connect": "open", // tcp-connection status
"status_trace": "open", // traceroute status
"target": "192.0.2.10", // trace target
"trace": [ // hops list
[
2, // hop: number
"192.0.2.3", // hop: address
0.328 // hop: time (ms)
],
[3, "192.0.2.4", 0.218],
[4, "192.0.2.5", 0.198],
[5, "192.0.2.10", 0.465]
]
},
{
"source": "192.0.2.2",
"status_connect": "open",
"status_trace": "open",
"target": "192.0.2.10",
"trace": [
[2, "192.0.2.3", 0.328],
[3, "192.0.2.4", 0.218],
[4, "192.0.2.5", 0.198],
[5, "192.0.2.10", 0.465]
]
}
]
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
Parameters
None
Return Values
String
"pong"
Example
POST /request/debug/ HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
{"method":"ping","params":null,"id":1}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37
{"result":"pong","error":null,"id":1}
$ wget https://api.qrator.net/request/debug/ \
--header='Content-Type: application/json' \
--post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"pong","error":null,"id":1}
$ curl https://api.qrator.net/request/debug/ \
-H 'Content-Type: application/json' \
--data '{"method":"ping","params":null,"id":1}'
$ curl https://api.qrator.net/request/debug/ \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"ping","params":null,"id":1}'
{"result":"pong","error":null,"id":1}
import requests
url="https://api.qrator.net/request/debug/"
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/debug/"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"pong","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"pong","error":null,"id":1}
{
"result": "pong",
"error": null,
"id": 1
}
null
Test
service_ports_test
Tests given ServicePorts
set to be valid, invalid port definitions will be removed.
Added
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
$ 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}'
$ 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}'
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/debug/"
payload={"method":"service_ports_test","params":{"80":["http"],"443":["http"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/debug/"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ports_test","params":{"80":["http"],"443":["http"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"444":["ntp"],"53":["tcp","udp"],"22":["tcp"],"65536":["http"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
{
"result": {
"22": [
"tcp"
],
"53": [
"tcp",
"udp"
],
"80": [
"http"
],
"443": [
"http"
]
},
"error": null,
"id": 1
}
{
"80": [
"http"
],
"443": [
"http"
],
"444": [
"ntp"
],
"53": [
"tcp",
"udp"
],
"22": [
"tcp"
],
"65536": [
"http"
]
}
test_iplist
Test given IP addresses to be valid IPList
.
Added
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
$ 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}'
$ 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}'
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/debug/"
payload={"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/debug/"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1","198.51.100.12"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_iplist","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
{
"result": [
"192.0.2.1",
"198.51.100.12"
],
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
test_timediplist
Test given IP addresses to be valid TimedIPList
.
Added
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
$ 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}'
$ 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}'
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/debug/"
payload={"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/debug/"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_timediplist","params":[["192.0.2.1",80],"198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[["192.0.2.1",80],["198.51.100.12",0]],"error":null,"id":1}
{
"result": [
[
"192.0.2.1",
80
],
[
"198.51.100.12",
0
]
],
"error": null,
"id": 1
}
[
[
"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
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
$ 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}'
$ 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}'
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/debug/"
payload={"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/debug/"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1","198.51.100.12"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/debug/",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"test_upstreamlist","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
{
"result": [
"192.0.2.1",
"198.51.100.12"
],
"error": null,
"id": 1
}
[
"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 bottom of the page. Make sure to use only number in your Qrator API calls.
Domains
domain_create
Creates single domain
Added
Parameters
Array of "Upstreams + Name" - [IPList
or UpstreamConfiguration
, String
]
Return Values
Number
- id of created domain
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":12,"error":null,"id":1}
$ 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 -
$ 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 -
{"result":12,"error":null,"id":1}
$ 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}'
$ 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}'
{"result":12,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":12,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_create","params":[["127.0.0.1","127.255.255.254"],"domain.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":12,"error":null,"id":1}
{
"result": 12,
"error": null,
"id": 1
}
[
[
"127.0.0.1",
"127.255.255.254"
],
"domain.example.com"
]
domains_get
Returns list of your domains and services.
Added
Parameters
None
Return Values
Example
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}
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}
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":["198.51.100.12"],"ip_json":["198.51.100.12"],"qratorIp":"service","isService":true,"ports":{"53":"dns","79":["tcp","udp"],"80":"http","443":"http"}}],"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"domains_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"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":["198.51.100.12"],"ip_json":["198.51.100.12"],"qratorIp":"service","isService":true,"ports":{"53":"dns","79":["tcp","udp"],"80":"http","443":"http"}}],"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domains_get","params":null,"id":1}'
$ 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}'
{"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":["198.51.100.12"],"ip_json":["198.51.100.12"],"qratorIp":"service","isService":true,"ports":{"53":"dns","79":["tcp","udp"],"80":"http","443":"http"}}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"domains_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domains_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None},{"id":2,"name":"text.example.com","status":"online","ip":["198.51.100.12"],"ip_json":["198.51.100.12"],"qratorIp":"service","isService":true,"ports":{"53":"dns","79":["tcp","udp"],"80":"http","443":"http"}}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domains_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domains_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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":["198.51.100.12"],"ip_json":["198.51.100.12"],"qratorIp":"service","isService":true,"ports":{"53":"dns","79":["tcp","udp"],"80":"http","443":"http"}}],"error":null,"id":1}
{
"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": [
"198.51.100.12"
],
"ip_json": [
"198.51.100.12"
],
"qratorIp": "service",
"isService": true,
"ports": {
"53": "dns",
"79": [
"tcp",
"udp"
],
"80": "http",
"443": "http"
}
}
],
"error": null,
"id": 1
}
null
Prefixes
prefix_announce_off
Turns prefix announcing off.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_off","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"178.248.232.0/23"
]
prefix_announce_on
Turns prefix announcing on.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_on","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"178.248.232.0/23"
]
prefix_announce_status
Returns announce status of given prefix.
Parameters
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 40
{"result":"offline","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"offline","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"offline","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"offline","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_announce_status","params":["178.248.232.0/23"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"offline","error":null,"id":1}
{
"result": "offline",
"error": null,
"id": 1
}
[
"178.248.232.0/23"
]
prefix_list
Returns list of your prefixes.
Parameters
None
Return Values
Example
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}
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}
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}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"prefix_list","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"prefix_list","params":null,"id":1}'
$ 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}'
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"prefix_list","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"prefix_list","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"prefix_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"announce":"offline","prefix":"178.248.232.0/23"},{"announce":"offline","prefix":"178.248.232.0/24"}],"error":null,"id":1}
{
"result": [
{
"announce": "offline",
"prefix": "178.248.232.0/23"
},
{
"announce": "offline",
"prefix": "178.248.232.0/24"
}
],
"error": null,
"id": 1
}
null
Services
service_create
Creates single service
Added
Parameters
Array of "Upstreams + Ports + Name" - [ IPList
, ServicePorts
, String
]
Return Values
Number
- id of created service
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":13,"error":null,"id":1}
$ 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 -
$ 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 -
{"result":13,"error":null,"id":1}
$ 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}'
$ 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}'
{"result":13,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"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}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"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}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":13,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"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}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"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}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":13,"error":null,"id":1}
{
"result": 13,
"error": null,
"id": 1
}
[
[
"127.0.0.1",
"127.255.255.254"
],
{
"22": "tcp",
"53": [
"tcp",
"udp"
],
"80": "http",
"443": "http"
},
"service.example.com"
]
Whitelist
whitelist_append
Added given IP addresses to whitelist.
TimedIP
with comments.
Added
Parameters
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 176
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 176
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/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],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}'
$ curl https://api.qrator.net/request/client/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],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"with comment and timeout"],["198.51.100.22",0,"with comment, permanent"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"with comment and timeout"
],
[
"198.51.100.22",
0,
"with comment, permanent"
]
]
whitelist_relay_append
Added given IP addresses to whitelist.
TimedIP
without comments.
Added
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
whitelist_remove
Removes given IP addresses from whitelist.
Added
Parameters
Return Values
Example
POST /request/client/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}
POST /request/client/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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
$ curl https://api.qrator.net/request/client/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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
Blacklist
blacklist_append
Added given IP addresses to blacklist.
TimedIP
with comments.
Added
Parameters
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}'
$ curl https://api.qrator.net/request/client/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],["198.51.100.21",720,"some comment"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
]
]
blacklist_check
Checks if given IP address is blacklisted or not for active domains and services.
Added
Parameters
Return Values
Enum
with value from following list:
- Banned: given IP address is blacklisted
- NotBanned: given IP address is not blacklisted
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 61
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"1":"Banned","2":"NotBanned"},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"1":"Banned","2":"NotBanned"},"error":null,"id":1}
{
"result": {
"1": "Banned",
"2": "NotBanned"
},
"error": null,
"id": 1
}
[
"198.51.100.12"
]
blacklist_relay_ban
Added given IP addresses to blacklist.
TimedIP
without comments.
Added
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
blacklist_remove
Removes given IP addresses from blacklist.
Added
Parameters
Return Values
Example
POST /request/client/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}
POST /request/client/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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}'
$ curl https://api.qrator.net/request/client/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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
"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
Parameters
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 59
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"1":"HTTP","2":"NotBanned"},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"1":"HTTP","2":"NotBanned"},"error":null,"id":1}
{
"result": {
"1": "HTTP",
"2": "NotBanned"
},
"error": null,
"id": 1
}
[
"198.51.100.12"
]
Contacts
contact_create
Added
Parameters
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 286
{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 286
X-Qrator-Auth: aabbccddeeff
{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 219
{"result":{"id":1001,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true,"policy_groups":[1,2,3]}},"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}' --quiet -O -
{"result":{"id":1001,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true,"policy_groups":[1,2,3]}},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}'
{"result":{"id":1001,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true,"policy_groups":[1,2,3]}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"id":1001,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true,"policy_groups":[1,2,3]}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"contact_create","params":{"email":"john@example.com","first_name":"John","middle_name":"Smith","last_name":"Random","lang":"en","report_lang":"en","password":"my5ecu4ePassw0rd","roles":["technical","administrative"],"send_password_reset":true,"policy_groups":[1,2,3]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"id":1001,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true,"policy_groups":[1,2,3]}},"error":null,"id":1}
{
"result": {
"id": 1001,
"email": "john@example.com",
"first_name": "John",
"middle_name": "Random",
"last_name": "User",
"role": {
"technical": false,
"finance": true,
"administrative": true,
"policy_groups": [
1,
2,
3
]
}
},
"error": null,
"id": 1
}
{
"email": "john@example.com",
"first_name": "John",
"middle_name": "Smith",
"last_name": "Random",
"lang": "en",
"report_lang": "en",
"password": "my5ecu4ePassw0rd",
"roles": [
"technical",
"administrative"
],
"send_password_reset": true,
"policy_groups": [
1,
2,
3
]
}
contacts_get
Returns list of contacts registered at Qrator personal dashboard
Added
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 268
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true},"2fa_enabled":true,"lang":"en","report_lang":"en","policy_groups":[1,2,3]}],"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"contacts_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true},"2fa_enabled":true,"lang":"en","report_lang":"en","policy_groups":[1,2,3]}],"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"contacts_get","params":null,"id":1}'
$ 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}'
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true},"2fa_enabled":true,"lang":"en","report_lang":"en","policy_groups":[1,2,3]}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"contacts_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"contacts_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true},"2fa_enabled":true,"lang":"en","report_lang":"en","policy_groups":[1,2,3]}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"contacts_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"contacts_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"id":1,"email":"john@example.com","first_name":"John","middle_name":"Random","last_name":"User","role":{"technical":false,"finance":true,"administrative":true},"2fa_enabled":true,"lang":"en","report_lang":"en","policy_groups":[1,2,3]}],"error":null,"id":1}
{
"result": [
{
"id": 1,
"email": "john@example.com",
"first_name": "John",
"middle_name": "Random",
"last_name": "User",
"role": {
"technical": false,
"finance": true,
"administrative": true
},
"2fa_enabled": true,
"lang": "en",
"report_lang": "en",
"policy_groups": [
1,
2,
3
]
}
],
"error": null,
"id": 1
}
null
login_link
Returns link (and it's expire time) for loging-in to Personal Dashboard at https://client.qrator.net
Added
Parameters
Number
contact id, boolean
flag to skip 2fa (or not) at login (default: false
)
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
{"method":"login_link","params":[1001,true],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff
{"method":"login_link","params":[1001,true],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 136
{"result":{"link":"https://client.qrator.net/auth/otl/some-characters-here","expireAt":"2023-02-14T10:22:49+00:00"},"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"login_link","params":[1001,true],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"login_link","params":[1001,true],"id":1}' --quiet -O -
{"result":{"link":"https://client.qrator.net/auth/otl/some-characters-here","expireAt":"2023-02-14T10:22:49+00:00"},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"login_link","params":[1001,true],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"login_link","params":[1001,true],"id":1}'
{"result":{"link":"https://client.qrator.net/auth/otl/some-characters-here","expireAt":"2023-02-14T10:22:49+00:00"},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"login_link","params":[1001,true],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"login_link","params":[1001,true],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"link":"https://client.qrator.net/auth/otl/some-characters-here","expireAt":"2023-02-14T10:22:49+00:00"},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"login_link","params":[1001,true],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"login_link","params":[1001,true],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"link":"https://client.qrator.net/auth/otl/some-characters-here","expireAt":"2023-02-14T10:22:49+00:00"},"error":null,"id":1}
{
"result": {
"link": "https://client.qrator.net/auth/otl/some-characters-here",
"expireAt": "2023-02-14T10:22:49+00:00"
},
"error": null,
"id": 1
}
[
1001,
true
]
policy_groups_get
Returns list of Policy groups
Added
Parameters
None
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
{"method":"policy_groups_get","params":null,"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff
{"method":"policy_groups_get","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 68
{"result":[{"id":1,"name":"Policy group name"}],"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"policy_groups_get","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"policy_groups_get","params":null,"id":1}' --quiet -O -
{"result":[{"id":1,"name":"Policy group name"}],"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"policy_groups_get","params":null,"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"policy_groups_get","params":null,"id":1}'
{"result":[{"id":1,"name":"Policy group name"}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"policy_groups_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"policy_groups_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"id":1,"name":"Policy group name"}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"policy_groups_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"policy_groups_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"id":1,"name":"Policy group name"}],"error":null,"id":1}
{
"result": [
{
"id": 1,
"name": "Policy group name"
}
],
"error": null,
"id": 1
}
null
Certificate storage
certificate_get
Get single certificate.
Added
Parameters
Number
certificate id
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
{"method":"certificate_get","params":[302],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
X-Qrator-Auth: aabbccddeeff
{"method":"certificate_get","params":[302],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1252
{"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}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certificate_get","params":[302],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"certificate_get","params":[302],"id":1}' --quiet -O -
{"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}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certificate_get","params":[302],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"certificate_get","params":[302],"id":1}'
{"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}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certificate_get","params":[302],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certificate_get","params":[302],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"id":320,"type":"upload","not_valid_before":1481545141,"not_valid_after":1607775541,"autoupdate":None,"domain_id":None,"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":None,"domain_id":1,"certificate":320}]},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_get","params":[302],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_get","params":[302],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
[
302
]
certificate_list
Returns list of your certificates.
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certificate_list","params":null,"id":1}' --quiet -O -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certificate_list","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certificate_list","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certificate_list","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"id":320,"type":"upload","not_valid_before":1481545141,"not_valid_after":1607775541,"autoupdate":None,"domain_id":None,"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":None,"domain_id":1,"certificate":320}]}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
certificate_remove
Remove uploaded certificate from storage
Added
Parameters
Number
certificate id
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
{"method":"certificate_remove","params":[302],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff
{"method":"certificate_remove","params":[302],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certificate_remove","params":[302],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"certificate_remove","params":[302],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certificate_remove","params":[302],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"certificate_remove","params":[302],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certificate_remove","params":[302],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certificate_remove","params":[302],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_remove","params":[302],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_remove","params":[302],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
302
]
certificate_replace
Replace Source certificate with Target certificate
target
certificate was used, the source
certificate will be used instead.
Parameters
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 76
{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 76
X-Qrator-Auth: aabbccddeeff
{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certificate_replace","params":{"source":100,"target":200},"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certificate_replace","params":{"source":100,"target":200},"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certificate_replace","params":{"source":100,"target":200},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
{
"source": 100,
"target": 200
}
certrequest_get
Get single certificate request.
Added
Parameters
Number
request id
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
{"method":"certrequest_get","params":[333],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
X-Qrator-Auth: aabbccddeeff
{"method":"certrequest_get","params":[333],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2492
{"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}},"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certrequest_get","params":[333],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"certrequest_get","params":[333],"id":1}' --quiet -O -
{"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}},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certrequest_get","params":[333],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"certrequest_get","params":[333],"id":1}'
{"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}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certrequest_get","params":[333],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certrequest_get","params":[333],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"id":333,"type":"upload","created":1600941096,"status":"done","domain_id":None,"hostnames":None,"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":None,"domain_errors":None}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_get","params":[333],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_get","params":[333],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}},"error":null,"id":1}
{
"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
}
},
"error": null,
"id": 1
}
[
333
]
certrequest_install
Install one certificate-chain from processed certificate request to your Certificate storage.
Added
Parameters
Number
certificate request id, String
Chain key, Number
Chain Id
Return Values
Number
certificate Id
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35
{"result":1104,"error":null,"id":1}
$ 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 -
$ 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 -
{"result":1104,"error":null,"id":1}
$ 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}'
$ 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}'
{"result":1104,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"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}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"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}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":1104,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"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}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"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}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":1104,"error":null,"id":1}
{
"result": 1104,
"error": null,
"id": 1
}
[
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_le
Create new certificate request by issuing Let’s Encrypt certificate.
online
) domains allowed to be used with this method.
- minimum number of hostnames is
1
- maximum number of hostnames
12
.
- must have DNS A-record, pointing to
qratorIp
(see DomainList) of given domain - must NOT have DNS AAAA-record
Added
Parameters
Domain id (Number
) + non empty list of hostnames (StringList
)
Return Values
Example
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 65
{"method":"certrequest_le","params":[132,["example.com"]],"id":1}
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 65
X-Qrator-Auth: aabbccddeeff
{"method":"certrequest_le","params":[132,["example.com"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 221
{"result":{"id":335,"type":"letsencrypt","created":1659970508,"status":"new","domain_id":132,"hostnames":["example.com"],"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}' --quiet -O -
{"result":{"id":335,"type":"letsencrypt","created":1659970508,"status":"new","domain_id":132,"hostnames":["example.com"],"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}'
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}'
{"result":{"id":335,"type":"letsencrypt","created":1659970508,"status":"new","domain_id":132,"hostnames":["example.com"],"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certrequest_le","params":[132,["example.com"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certrequest_le","params":[132,["example.com"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"id":335,"type":"letsencrypt","created":1659970508,"status":"new","domain_id":132,"hostnames":["example.com"],"result":{"chains":None,"file_errors":None,"errors":None,"domain_errors":None}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_le","params":[132,["example.com"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"id":335,"type":"letsencrypt","created":1659970508,"status":"new","domain_id":132,"hostnames":["example.com"],"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
{
"result": {
"id": 335,
"type": "letsencrypt",
"created": 1659970508,
"status": "new",
"domain_id": 132,
"hostnames": [
"example.com"
],
"result": {
"chains": null,
"file_errors": null,
"errors": null,
"domain_errors": null
}
},
"error": null,
"id": 1
}
[
132,
[
"example.com"
]
]
certrequest_list
Returns list of your certificate requests.
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certrequest_list","params":null,"id":1}' --quiet -O -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certrequest_list","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certrequest_list","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certrequest_list","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"id":333,"type":"upload","created":1600941096,"status":"done","domain_id":None,"hostnames":None,"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":None,"domain_errors":None}},{"id":334,"type":"upload","created":1600941096,"status":"done","domain_id":None,"hostnames":None,"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":None,"domain_errors":None}}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
certrequest_remove
Remove certificate request.
Added
Parameters
Number
request id
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"certrequest_remove","params":[334],"id":1}' --quiet -O -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"certrequest_remove","params":[334],"id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certrequest_remove","params":[334],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certrequest_remove","params":[334],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_remove","params":[334],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_remove","params":[334],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
334
]
certrequest_upload
Create new certificate request by uploading PEM
encoded certificate and private key.
Added
Parameters
String
certificate or chain certificates, String
private keys
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 206
{"result":{"id":335,"type":"upload","created":1600941096,"status":"new","domain_id":null,"hostnames":null,"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"id":335,"type":"upload","created":1600941096,"status":"new","domain_id":null,"hostnames":null,"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
$ 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}'
$ 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}'
{"result":{"id":335,"type":"upload","created":1600941096,"status":"new","domain_id":null,"hostnames":null,"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"id":335,"type":"upload","created":1600941096,"status":"new","domain_id":None,"hostnames":None,"result":{"chains":None,"file_errors":None,"errors":None,"domain_errors":None}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"certrequest_upload","params":["-----BEGIN CERTIFICATE-----\nMIIFWTCCBEGgAwIBAgISBGVdsU0sz+nFwv3lDHIxWhMJMA0GCSqGSIb3DQEBCwUA\n...\n-----END CERTIFICATE-----","-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4+CxjwUvKm7aU\n...\n-----END PRIVATE KEY-----"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"id":335,"type":"upload","created":1600941096,"status":"new","domain_id":null,"hostnames":null,"result":{"chains":null,"file_errors":null,"errors":null,"domain_errors":null}},"error":null,"id":1}
{
"result": {
"id": 335,
"type": "upload",
"created": 1600941096,
"status": "new",
"domain_id": null,
"hostnames": null,
"result": {
"chains": null,
"file_errors": null,
"errors": null,
"domain_errors": null
}
},
"error": null,
"id": 1
}
[
"-----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
Parameters
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 59
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ip_status","params":"198.51.100.12","id":1}'
$ 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}'
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"ip_status","params":"198.51.100.12","id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ip_status","params":"198.51.100.12","id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"1":"Allowed","2":"Banned"},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":"198.51.100.12","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":"198.51.100.12","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"1":"Allowed","2":"Banned"},"error":null,"id":1}
{
"result": {
"1": "Allowed",
"2": "Banned"
},
"error": null,
"id": 1
}
"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
POST /request/client/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
{"method":"ping","params":null,"id":1}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37
{"result":"pong","error":null,"id":1}
$ wget https://api.qrator.net/request/client/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"pong","error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ping","params":null,"id":1}'
$ 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}'
{"result":"pong","error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"pong","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"pong","error":null,"id":1}
{
"result": "pong",
"error": null,
"id": 1
}
null
source_ips_get
Returns list networks Qrator uses to access your servers
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
$ curl https://api.qrator.net/request/client/1 \
-H 'Content-Type: application/json' \
--data '{"method":"source_ips_get","params":null,"id":1}'
$ 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}'
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/client/1"
payload={"method":"source_ips_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/client/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"source_ips_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"source_ips_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/client/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"source_ips_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1/32","198.51.100.0/24"],"error":null,"id":1}
{
"result": [
"192.0.2.1/32",
"198.51.100.0/24"
],
"error": null,
"id": 1
}
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
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44
{"result":"example.com","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"example.com","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domain_name_get","params":null,"id":1}'
$ 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}'
{"result":"example.com","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_name_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_name_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"example.com","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"example.com","error":null,"id":1}
{
"result": "example.com",
"error": null,
"id": 1
}
null
domain_name_set
Sets name for domain
Deprecated
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domain_name_set","params":"example.com","id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_name_set","params":"example.com","id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_name_set","params":"example.com","id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
"example.com"
name_get
Returns current domain name.
Replacement for domain_name_get
and service_name_get
methods
Added
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44
{"result":"example.com","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"example.com","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"name_get","params":null,"id":1}'
$ 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}'
{"result":"example.com","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"name_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"name_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"example.com","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"example.com","error":null,"id":1}
{
"result": "example.com",
"error": null,
"id": 1
}
null
name_set
Sets name for domain
Replacement for domain_name_set
and service_name_set
methods
Added
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"name_set","params":"example.com","id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"name_set","params":"example.com","id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"name_set","params":"example.com","id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
"example.com"
Domain Status
domain_status_get
Returns current domain status.
Deprecated
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"online","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"online","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domain_status_get","params":null,"id":1}'
$ 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}'
{"result":"online","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_status_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_status_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"online","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"online","error":null,"id":1}
{
"result": "online",
"error": null,
"id": 1
}
null
not_whitelisted_policy_get
Returns current AccessPolicy
.
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"accept","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"accept","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"not_whitelisted_policy_get","params":null,"id":1}'
$ 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}'
{"result":"accept","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"not_whitelisted_policy_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"not_whitelisted_policy_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"accept","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"accept","error":null,"id":1}
{
"result": "accept",
"error": null,
"id": 1
}
null
not_whitelisted_policy_set
Sets current AccessPolicy
.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"not_whitelisted_policy_set","params":["accept"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"not_whitelisted_policy_set","params":["accept"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"online","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"online","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"status_get","params":null,"id":1}'
$ 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}'
{"result":"online","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"status_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"status_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"online","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"online","error":null,"id":1}
{
"result": "online",
"error": null,
"id": 1
}
null
Domain IP
domain_ip_get
Returns current upstreams IPs as JSON configuration.
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domain_ip_get","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_ip_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_ip_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
domain_ip_get_list
Returns current upstreams IPs as simple list.
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"domain_ip_get_list","params":null,"id":1}'
$ 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}'
{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_ip_get_list","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_ip_get_list","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["127.0.0.1","127.255.255.254"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_get_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_get_list","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["127.0.0.1","127.255.255.254"],"error":null,"id":1}
{
"result": [
"127.0.0.1",
"127.255.255.254"
],
"error": null,
"id": 1
}
null
domain_ip_set
Sets domains upstream IPs or configuration.
Parameters
IPList
or UpstreamConfiguration
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_set","params":["127.0.0.1","127.255.255.254"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"127.0.0.1",
"127.255.255.254"
]
domain_ip_test
Tests given parameters to be valid.
Parameters
IPList
or UpstreamConfiguration
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
$ 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}'
$ 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}'
{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"error":None,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"domain_ip_test","params":["127.0.0.1","127.255.255.254"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"error":null,"warning":[],"object":["127.0.0.1","127.255.255.254"]},"error":null,"id":1}
{
"result": {
"error": null,
"warning": [],
"object": [
"127.0.0.1",
"127.255.255.254"
]
},
"error": null,
"id": 1
}
[
"127.0.0.1",
"127.255.255.254"
]
Whitelist
whitelist_append
Added given IP addresses to whitelist.
TimedIP
with comments.
Parameters
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
]
]
whitelist_count
Returns count of IPs in whitelist.
Added
Parameters
None
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
{"method":"whitelist_count","params":null,"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_count","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":12,"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_count","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_count","params":null,"id":1}' --quiet -O -
{"result":12,"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_count","params":null,"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_count","params":null,"id":1}'
{"result":12,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_count","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_count","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":12,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":12,"error":null,"id":1}
{
"result": 12,
"error": null,
"id": 1
}
null
whitelist_flush
Removes all IP addresses from whitelist.
Added
Parameters
None
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
{"method":"whitelist_flush","params":null,"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_flush","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_flush","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_flush","params":null,"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_flush","params":null,"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_flush","params":null,"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_flush","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_flush","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
null
whitelist_get
Returns whitelist contents.
TimedIP
with comments when used with "tuple"
parameter.
Parameters
None or TimedIpMode
, default value is "legacy"
Return Values
TimedIPList
or TimedIPList
with comments
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
{"method":"whitelist_get","params":["tuple"],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_get","params":["tuple"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 138
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_get","params":["tuple"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_get","params":["tuple"],"id":1}' --quiet -O -
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_get","params":["tuple"],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_get","params":["tuple"],"id":1}'
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_get","params":["tuple"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_get","params":["tuple"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
{
"result": [
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
],
[
"198.51.100.22",
0,
"some comment"
]
],
"error": null,
"id": 1
}
[
"tuple"
]
whitelist_relay_append
Added given IP addresses to whitelist.
TimedIP
without comments.
Added
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
whitelist_remove
Removes given IP addresses from whitelist.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
Blacklist
blacklist_append
Added given IP addresses to blacklist.
TimedIP
with comments.
Parameters
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
]
]
blacklist_check
Checks if given IP address is blacklisted or not.
Parameters
Return Values
Enum
with value from following list:
- Banned: given IP address is blacklisted
- NotBanned: given IP address is not blacklisted
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"198.51.100.12"
]
blacklist_count
Returns count of blocked IPs by client (API/Dashboard).
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":10,"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_count","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":10,"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_count","params":null,"id":1}'
$ 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}'
{"result":10,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_count","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_count","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":10,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":10,"error":null,"id":1}
{
"result": 10,
"error": null,
"id": 1
}
null
blacklist_flush
Removes from blacklist all IP addresses, that been added using Qrator API
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_flush","params":null,"id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_flush","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_flush","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
null
blacklist_get
Returns blacklist contents.
TimedIP
with comments when used with "tuple"
parameter.
Parameters
None or TimedIpMode
, default value is "legacy"
Return Values
TimedIPList
or TimedIPList
with comments
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
{"method":"blacklist_get","params":["tuple"],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_get","params":["tuple"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 138
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_get","params":["tuple"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"blacklist_get","params":["tuple"],"id":1}' --quiet -O -
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_get","params":["tuple"],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"blacklist_get","params":["tuple"],"id":1}'
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_get","params":["tuple"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_get","params":["tuple"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
{
"result": [
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
],
[
"198.51.100.22",
0,
"some comment"
]
],
"error": null,
"id": 1
}
[
"tuple"
]
blacklist_relay_ban
Added given IP addresses to blacklist.
TimedIP
without comments.
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
blacklist_remove
Removes given IP addresses from blacklist.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"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
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"198.51.100.12"
]
Statistics
statistics_billable
Returns billable traffic (Mbps) for given month.
Added
Parameters
Month
or NULL
(for current month)
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":12,"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":12,"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_billable","params":null,"id":1}'
$ 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}'
{"result":12,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_billable","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_billable","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":12,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_billable","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_billable","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":12,"error":null,"id":1}
{
"result": 12,
"error": null,
"id": 1
}
null
statistics_current_blocks
Returns current blocks made by Qrator, Qrator.Antibot or WAF
Added
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 139
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_blocks","params":null,"id":1}'
$ 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}'
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_current_blocks","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_blocks","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_blocks","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_blocks","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
{
"result": {
"time": 1606828607,
"Qrator401": 28.2,
"Qrator403": 0.3,
"Waf403": 0.13,
"Qrator503Con": 32.44,
"Qrator503Req": 40.28
},
"error": null,
"id": 1
}
null
statistics_current_dns
Returns latest DNS-statistics snapshot.
Added
Parameters
None
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
{"method":"statistics_current_dns","params":null,"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_current_dns","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 446
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_dns","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_dns","params":null,"id":1}' --quiet -O -
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_dns","params":null,"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_dns","params":null,"id":1}'
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_current_dns","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_dns","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_dns","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_dns","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
{
"result": {
"time": 1649941740,
"cache": {
"hit": 18.88333333333334
},
"requests": {
"upstream": 0.05,
"invalid": 0,
"types": {
"A": 13.833333333333332,
"AAAA": 4.699999999999997,
"ANY": 0,
"CNAME": 0,
"NS": 0.08333333333333333,
"SOA": 0.016666666666666666,
"TXT": 0
},
"protocol": {
"tcp": 1.3333333333333335,
"udp": 17.616666666666667
}
},
"errors_user": {
"NXDOMAIN": 0.08333333333333333,
"SERVFAIL": 0
},
"errors_upstream": {
"Connect": 0,
"Recv": 0,
"Send": 0,
"Timeout": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_http
Returns latest HTTP-statistics snapshot.
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 257
{"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,"4xx":0}},"error":null,"id":1}
$ 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 -
$ 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 -
{"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,"4xx":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_http","params":null,"id":1}'
$ 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}'
{"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,"4xx":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_current_http","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_http","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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,"4xx":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_http","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_http","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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,"4xx":0}},"error":null,"id":1}
{
"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,
"4xx": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_ip
Returns latest IP-statistics snapshot.
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 192
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
$ 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 -
$ 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 -
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_ip","params":null,"id":1}'
$ 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}'
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_current_ip","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_ip","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_ip","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_ip","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
{
"result": {
"time": 1563204000,
"bandwidth": {
"input": 0,
"passed": 0,
"output": 0
},
"packets": {
"input": 0,
"passed": 0,
"output": 0
},
"blacklist": {
"qrator": 0,
"api": 0,
"waf": 0,
"custom": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_locations
Return current Geo-locations for IPs blacklist
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_locations","params":null,"id":1}'
$ 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}'
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_current_locations","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_locations","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_locations","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_locations","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
{
"result": {
"time": 1606828607,
"locations": {
"A1": 341.5,
"RU": 65.3,
"ID": 49,
"US": 27,
"BR": 26
}
},
"error": null,
"id": 1
}
null
statistics_get
Returns latest statistics snapshot.
statistics_current_ip
and statistics_current_http
, statistics_billable
methods instead.
Deprecated
Parameters
None
Return Values
Example
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}
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}
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}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_get","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
statistics_get_lite
Returns latest lite statistics (without "billable") snapshot.
statistics_current_ip
and statistics_current_http
methods instead.
Deprecated
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_get_lite","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"statistics_get_lite","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_get_lite","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get_lite","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get_lite","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
Certificate storage
sni_clear
Totally removes SNI-state (set of links) for resource.
Added
Parameters
None
Return Values
sni_get
Get current SNI configuration
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_get","params":null,"id":1}'
$ 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}'
{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"sni_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":1100,"port":443,"hostname":None,"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
sni_link_add
Add single SNI certificate-hostname record. If same link (port-hostname) exists - it will be overwritten
Added
Parameters
Number
port, Number
certificate id, String
hostname or NULL
(for default hostname)
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
X-Qrator-Auth: aabbccddeeff
{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 369
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}' --quiet -O -
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}'
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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":None,"domain_id":1,"certificate":320}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
{
"result": [
{
"link_id": 1103,
"port": 443,
"hostname": "www.example.com",
"domain_id": 1,
"certificate": 320
},
{
"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
}
[
443,
320,
"www.example.com"
]
sni_link_remove
Remove single SNI certificate-hostname record.
Added
Parameters
Number
link id
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
{"method":"sni_link_remove","params":[1103],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff
{"method":"sni_link_remove","params":[1103],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 280
{"result":[{"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}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_link_remove","params":[1103],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_link_remove","params":[1103],"id":1}' --quiet -O -
{"result":[{"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}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_link_remove","params":[1103],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_link_remove","params":[1103],"id":1}'
{"result":[{"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}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"sni_link_remove","params":[1103],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_link_remove","params":[1103],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"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":None,"domain_id":1,"certificate":320}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_remove","params":[1103],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_remove","params":[1103],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"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}
{
"result": [
{
"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
}
[
1103
]
sni_set
Sets full SNI-state (set of links) for resource.
Added
Parameters
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 201
{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 201
X-Qrator-Auth: aabbccddeeff
{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 282
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}' --quiet -O -
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}'
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":None},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":None},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":2101,"port":443,"hostname":None,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
{
"result": [
{
"link_id": 2101,
"port": 443,
"hostname": null,
"domain_id": 1,
"certificate": 420
},
{
"link_id": 2102,
"port": 443,
"hostname": "example.com",
"domain_id": 1,
"certificate": 420
},
{
"link_id": 2103,
"port": 443,
"hostname": "www.example.com",
"domain_id": 1,
"certificate": 421
}
],
"error": null,
"id": 1
}
[
{
"port": 443,
"certificate": 420,
"hostname": null
},
{
"port": 443,
"certificate": 420,
"hostname": "example.com"
},
{
"port": 443,
"certificate": 421,
"hostname": "www.example.com"
}
]
Troubleshoot
ip_status
Checks status of given IP address.
Added
Parameters
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"ip_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ip_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"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
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
{"method":"ping","params":null,"id":1}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37
{"result":"pong","error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"pong","error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ping","params":null,"id":1}'
$ 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}'
{"result":"pong","error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"pong","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"pong","error":null,"id":1}
{
"result": "pong",
"error": null,
"id": 1
}
null
troubleshoot_traceroute
Performs TCP traceroute to specified IP and port from active Qrator nodes.
Parameters
Return Values
Example
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}
POST /request/domain/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
X-Qrator-Auth: aabbccddeeff
{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 220
{"result":[{"source":"192.0.2.2","status_connect":"open","status_trace":"open","target":"192.0.2.3","trace":[[2,"192.0.2.4",0.328],[3,"192.0.2.5",0.218],[4,"192.0.2.5",0.198],[4,"192.0.2.1",0.465]]}],"error":null,"id":1}
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/domain/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}' --quiet -O -
{"result":[{"source":"192.0.2.2","status_connect":"open","status_trace":"open","target":"192.0.2.3","trace":[[2,"192.0.2.4",0.328],[3,"192.0.2.5",0.218],[4,"192.0.2.5",0.198],[4,"192.0.2.1",0.465]]}],"error":null,"id":1}
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' \
--data '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}'
$ curl https://api.qrator.net/request/domain/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}'
{"result":[{"source":"192.0.2.2","status_connect":"open","status_trace":"open","target":"192.0.2.3","trace":[[2,"192.0.2.4",0.328],[3,"192.0.2.5",0.218],[4,"192.0.2.5",0.198],[4,"192.0.2.1",0.465]]}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/domain/1"
payload={"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/domain/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"source":"192.0.2.2","status_connect":"open","status_trace":"open","target":"192.0.2.3","trace":[[2,"192.0.2.4",0.328],[3,"192.0.2.5",0.218],[4,"192.0.2.5",0.198],[4,"192.0.2.1",0.465]]}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/domain/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"troubleshoot_traceroute","params":["192.0.2.1",80],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"source":"192.0.2.2","status_connect":"open","status_trace":"open","target":"192.0.2.3","trace":[[2,"192.0.2.4",0.328],[3,"192.0.2.5",0.218],[4,"192.0.2.5",0.198],[4,"192.0.2.1",0.465]]}],"error":null,"id":1}
{
"result": [
{
"source": "192.0.2.2",
"status_connect": "open",
"status_trace": "open",
"target": "192.0.2.3",
"trace": [
[
2,
"192.0.2.4",
0.328
],
[
3,
"192.0.2.5",
0.218
],
[
4,
"192.0.2.5",
0.198
],
[
4,
"192.0.2.1",
0.465
]
]
}
],
"error": null,
"id": 1
}
[
"192.0.2.1",
80
]
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
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44
{"result":"example.com","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"name_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"example.com","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"name_get","params":null,"id":1}'
$ 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}'
{"result":"example.com","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"name_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"name_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"example.com","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"example.com","error":null,"id":1}
{
"result": "example.com",
"error": null,
"id": 1
}
null
name_set
Sets name for domain
Replacement for domain_name_set
and service_name_set
methods
Added
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"name_set","params":"example.com","id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"name_set","params":"example.com","id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"name_set","params":"example.com","id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
"example.com"
service_name_get
Returns current service name.
Deprecated
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44
{"result":"example.com","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"example.com","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"service_name_get","params":null,"id":1}'
$ 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}'
{"result":"example.com","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_name_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_name_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"example.com","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_name_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"example.com","error":null,"id":1}
{
"result": "example.com",
"error": null,
"id": 1
}
null
service_name_set
Sets name for service
Deprecated
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"service_name_set","params":"example.com","id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_name_set","params":"example.com","id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_name_set","params":"example.com","id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_name_set","params":"example.com","id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
"example.com"
Service Status
not_whitelisted_policy_get
Returns current AccessPolicy
.
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"accept","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"accept","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"not_whitelisted_policy_get","params":null,"id":1}'
$ 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}'
{"result":"accept","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"not_whitelisted_policy_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"not_whitelisted_policy_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"accept","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"accept","error":null,"id":1}
{
"result": "accept",
"error": null,
"id": 1
}
null
not_whitelisted_policy_set
Sets current AccessPolicy
.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"not_whitelisted_policy_set","params":["accept"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"not_whitelisted_policy_set","params":["accept"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"not_whitelisted_policy_set","params":["accept"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"accept"
]
service_status_get
Returns current domain status.
Deprecated
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"online","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"online","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"service_status_get","params":null,"id":1}'
$ 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}'
{"result":"online","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_status_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_status_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"online","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"online","error":null,"id":1}
{
"result": "online",
"error": null,
"id": 1
}
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{"result":"online","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"status_get","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"online","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"status_get","params":null,"id":1}'
$ 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}'
{"result":"online","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"status_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"status_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"online","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"online","error":null,"id":1}
{
"result": "online",
"error": null,
"id": 1
}
null
status_set
Sets service status online/offline
Added
Parameters
String
"online" or "offline"
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
{"method":"status_set","params":["online"],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 50
X-Qrator-Auth: aabbccddeeff
{"method":"status_set","params":["online"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"status_set","params":["online"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"status_set","params":["online"],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"status_set","params":["online"],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"status_set","params":["online"],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"status_set","params":["online"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"status_set","params":["online"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_set","params":["online"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"status_set","params":["online"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"online"
]
Service IP
service_ip_get
Returns current upstream IPs.
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"service_ip_get","params":null,"id":1}'
$ 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}'
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ip_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ip_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1","198.51.100.12"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
{
"result": [
"192.0.2.1",
"198.51.100.12"
],
"error": null,
"id": 1
}
null
service_ip_set
Sets service's upstream IPs..
Added
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ip_set","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ip_set","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_set","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_set","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
service_ip_test
Test given IP addresses to be valid IPList
.
Added
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
$ 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}'
$ 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}'
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1","198.51.100.12"],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ip_test","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1","198.51.100.12"],"error":null,"id":1}
{
"result": [
"192.0.2.1",
"198.51.100.12"
],
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
Service Ports
service_ports_get
Returns current upstream ports.
Added
Parameters
None
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"service_ports_get","params":null,"id":1}'
$ 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}'
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ports_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ports_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
{
"result": {
"22": [
"tcp"
],
"53": [
"tcp",
"udp"
],
"80": [
"http"
],
"443": [
"http"
]
},
"error": null,
"id": 1
}
null
service_ports_set
Sets service's upstream ports.
Added
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_set","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
{
"80": [
"http"
],
"443": [
"http"
],
"53": [
"tcp",
"udp"
],
"22": [
"tcp"
]
}
service_ports_test
Tests given ServicePorts
set to be valid.
Added
Parameters
Return Values
Example
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}
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}
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}
$ 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 -
$ 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 -
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
$ 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}'
$ 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}'
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"service_ports_test","params":{"80":["http"],"443":["http"],"53":["tcp","udp"],"22":["tcp"]},"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"22":["tcp"],"53":["tcp","udp"],"80":["http"],"443":["http"]},"error":null,"id":1}
{
"result": {
"22": [
"tcp"
],
"53": [
"tcp",
"udp"
],
"80": [
"http"
],
"443": [
"http"
]
},
"error": null,
"id": 1
}
{
"80": [
"http"
],
"443": [
"http"
],
"53": [
"tcp",
"udp"
],
"22": [
"tcp"
]
}
Whitelist
whitelist_append
Added given IP addresses to whitelist.
TimedIP
with comments.
Parameters
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
]
]
whitelist_count
Returns count of IPs in whitelist.
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
{"method":"whitelist_count","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_count","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":12,"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_count","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_count","params":null,"id":1}' --quiet -O -
{"result":12,"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_count","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_count","params":null,"id":1}'
{"result":12,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_count","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_count","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":12,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":12,"error":null,"id":1}
{
"result": 12,
"error": null,
"id": 1
}
null
whitelist_flush
Removes all IP addresses from whitelist.
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
{"method":"whitelist_flush","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 49
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_flush","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_flush","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_flush","params":null,"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_flush","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_flush","params":null,"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_flush","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_flush","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
null
whitelist_get
Returns whitelist contents.
TimedIP
with comments when used with "tuple"
parameter.
Parameters
None or TimedIpMode
, default value is "legacy"
Return Values
TimedIPList
or TimedIPList
with comments
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
{"method":"whitelist_get","params":["tuple"],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_get","params":["tuple"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 138
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_get","params":["tuple"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_get","params":["tuple"],"id":1}' --quiet -O -
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_get","params":["tuple"],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_get","params":["tuple"],"id":1}'
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_get","params":["tuple"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_get","params":["tuple"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
{
"result": [
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
],
[
"198.51.100.22",
0,
"some comment"
]
],
"error": null,
"id": 1
}
[
"tuple"
]
whitelist_relay_append
Added given IP addresses to whitelist.
TimedIP
without comments.
Added
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 87
X-Qrator-Auth: aabbccddeeff
{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_relay_append","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
whitelist_remove
Removes given IP addresses from whitelist.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"whitelist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
"198.51.100.12"
]
Blacklist
blacklist_append
Added given IP addresses to blacklist.
TimedIP
with comments.
Parameters
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 118
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
$ 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],["198.51.100.21",720,"some comment"]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
$ 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],["198.51.100.21",720,"some comment"]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_append","params":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
]
]
blacklist_check
Checks if given IP address is blacklisted or not.
Parameters
Return Values
Enum
with value from following list:
- Banned: given IP address is blacklisted
- NotBanned: given IP address is not blacklisted
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_check","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_check","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"198.51.100.12"
]
blacklist_count
Returns count of blocked IPs by client (API/Dashboard).
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":10,"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_count","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":10,"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_count","params":null,"id":1}'
$ 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}'
{"result":10,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_count","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_count","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":10,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_count","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":10,"error":null,"id":1}
{
"result": 10,
"error": null,
"id": 1
}
null
blacklist_flush
Removes from blacklist all IP addresses, that been added using Qrator API
Parameters
None
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_flush","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_flush","params":null,"id":1}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_flush","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_flush","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_flush","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
null
blacklist_get
Returns blacklist contents.
TimedIP
with comments when used with "tuple"
parameter.
Parameters
None or TimedIpMode
, default value is "legacy"
Return Values
TimedIPList
or TimedIPList
with comments
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
{"method":"blacklist_get","params":["tuple"],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 52
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_get","params":["tuple"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 138
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_get","params":["tuple"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"blacklist_get","params":["tuple"],"id":1}' --quiet -O -
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_get","params":["tuple"],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"blacklist_get","params":["tuple"],"id":1}'
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_get","params":["tuple"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_get","params":["tuple"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_get","params":["tuple"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":["192.0.2.1",["198.51.100.12",720],["198.51.100.21",720,"some comment"],["198.51.100.22",0,"some comment"]],"error":null,"id":1}
{
"result": [
"192.0.2.1",
[
"198.51.100.12",
720
],
[
"198.51.100.21",
720,
"some comment"
],
[
"198.51.100.22",
0,
"some comment"
]
],
"error": null,
"id": 1
}
[
"tuple"
]
blacklist_relay_ban
Added given IP addresses to blacklist.
TimedIP
without comments.
Parameters
IPList
or TimedIPList
, max 300 elements in list
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 84
X-Qrator-Auth: aabbccddeeff
{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}' --quiet -O -
{"result":"Successful","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_relay_ban","params":["192.0.2.1",["198.51.100.12",720]],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"192.0.2.1",
[
"198.51.100.12",
720
]
]
blacklist_remove
Removes given IP addresses from blacklist.
Parameters
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
{"result":"Successful","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"Successful","error":null,"id":1}
$ 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}'
$ 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}'
{"result":"Successful","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"Successful","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_remove","params":["192.0.2.1","198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"Successful","error":null,"id":1}
{
"result": "Successful",
"error": null,
"id": 1
}
[
"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
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
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ 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 -
$ 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 -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}'
$ 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}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"blacklist_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"blacklist_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"198.51.100.12"
]
Statistics
statistics_billable
Returns billable traffic (Mbps) for given month.
Added
Parameters
Month
or NULL
(for current month)
Return Values
Example
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}
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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 33
{"result":12,"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_billable","params":null,"id":1}' --quiet -O -
$ 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 -
{"result":12,"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_billable","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_billable","params":null,"id":1}'
{"result":12,"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_billable","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_billable","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":12,"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_billable","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_billable","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":12,"error":null,"id":1}
{
"result": 12,
"error": null,
"id": 1
}
null
statistics_current_blocks
Returns current blocks made by Qrator, Qrator.Antibot or WAF
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 59
{"method":"statistics_current_blocks","params":null,"id":1}
POST /request/service/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}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 139
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_blocks","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_blocks","params":null,"id":1}' --quiet -O -
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_blocks","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_blocks","params":null,"id":1}'
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_current_blocks","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_blocks","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_blocks","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_blocks","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1606828607,"Qrator401":28.2,"Qrator403":0.3,"Waf403":0.13,"Qrator503Con":32.44,"Qrator503Req":40.28},"error":null,"id":1}
{
"result": {
"time": 1606828607,
"Qrator401": 28.2,
"Qrator403": 0.3,
"Waf403": 0.13,
"Qrator503Con": 32.44,
"Qrator503Req": 40.28
},
"error": null,
"id": 1
}
null
statistics_current_dns
Returns latest DNS-statistics snapshot.
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
{"method":"statistics_current_dns","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_current_dns","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 446
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_dns","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_dns","params":null,"id":1}' --quiet -O -
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_dns","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_dns","params":null,"id":1}'
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_current_dns","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_dns","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_dns","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_dns","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1649941740,"cache":{"hit":18.88333333333334},"requests":{"upstream":0.05,"invalid":0,"types":{"A":13.833333333333332,"AAAA":4.699999999999997,"ANY":0,"CNAME":0,"NS":0.08333333333333333,"SOA":0.016666666666666666,"TXT":0},"protocol":{"tcp":1.3333333333333335,"udp":17.616666666666667}},"errors_user":{"NXDOMAIN":0.08333333333333333,"SERVFAIL":0},"errors_upstream":{"Connect":0,"Recv":0,"Send":0,"Timeout":0}},"error":null,"id":1}
{
"result": {
"time": 1649941740,
"cache": {
"hit": 18.88333333333334
},
"requests": {
"upstream": 0.05,
"invalid": 0,
"types": {
"A": 13.833333333333332,
"AAAA": 4.699999999999997,
"ANY": 0,
"CNAME": 0,
"NS": 0.08333333333333333,
"SOA": 0.016666666666666666,
"TXT": 0
},
"protocol": {
"tcp": 1.3333333333333335,
"udp": 17.616666666666667
}
},
"errors_user": {
"NXDOMAIN": 0.08333333333333333,
"SERVFAIL": 0
},
"errors_upstream": {
"Connect": 0,
"Recv": 0,
"Send": 0,
"Timeout": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_http
Returns latest HTTP-statistics snapshot.
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57
{"method":"statistics_current_http","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 57
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_current_http","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 257
{"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,"4xx":0}},"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_http","params":null,"id":1}' --quiet -O -
{"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,"4xx":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_http","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_http","params":null,"id":1}'
{"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,"4xx":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_current_http","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_http","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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,"4xx":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_http","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_http","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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,"4xx":0}},"error":null,"id":1}
{
"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,
"4xx": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_ip
Returns latest IP-statistics snapshot.
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55
{"method":"statistics_current_ip","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 55
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_current_ip","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 192
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_ip","params":null,"id":1}' --quiet -O -
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_ip","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_ip","params":null,"id":1}'
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_current_ip","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_ip","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_ip","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_ip","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1563204000,"bandwidth":{"input":0,"passed":0,"output":0},"packets":{"input":0,"passed":0,"output":0},"blacklist":{"qrator":0,"api":0,"waf":0,"custom":0}},"error":null,"id":1}
{
"result": {
"time": 1563204000,
"bandwidth": {
"input": 0,
"passed": 0,
"output": 0
},
"packets": {
"input": 0,
"passed": 0,
"output": 0
},
"blacklist": {
"qrator": 0,
"api": 0,
"waf": 0,
"custom": 0
}
},
"error": null,
"id": 1
}
null
statistics_current_locations
Return current Geo-locations for IPs blacklist
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 62
{"method":"statistics_current_locations","params":null,"id":1}
POST /request/service/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}
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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_current_locations","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_current_locations","params":null,"id":1}' --quiet -O -
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_current_locations","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_current_locations","params":null,"id":1}'
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_current_locations","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_current_locations","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_locations","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_current_locations","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":{"time":1606828607,"locations":{"A1":341.5,"RU":65.3,"ID":49,"US":27,"BR":26}},"error":null,"id":1}
{
"result": {
"time": 1606828607,
"locations": {
"A1": 341.5,
"RU": 65.3,
"ID": 49,
"US": 27,
"BR": 26
}
},
"error": null,
"id": 1
}
null
statistics_get
Returns latest statistics snapshot.
statistics_current_ip
and statistics_current_http
, statistics_billable
methods instead.
Deprecated
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
{"method":"statistics_get","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 48
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_get","params":null,"id":1}
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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_get","params":null,"id":1}' --quiet -O -
{"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}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_get","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_get","params":null,"id":1}'
{"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}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
statistics_get_lite
Returns latest lite statistics (without "billable") snapshot.
statistics_current_ip
and statistics_current_http
methods instead.
Deprecated
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
{"method":"statistics_get_lite","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 53
X-Qrator-Auth: aabbccddeeff
{"method":"statistics_get_lite","params":null,"id":1}
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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"statistics_get_lite","params":null,"id":1}' --quiet -O -
{"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}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"statistics_get_lite","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"statistics_get_lite","params":null,"id":1}'
{"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}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"statistics_get_lite","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"statistics_get_lite","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get_lite","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"statistics_get_lite","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
Certificate storage
sni_clear
Totally removes SNI-state (set of links) for resource.
Added
Parameters
None
Return Values
sni_get
Get current SNI configuration
Added
Parameters
None
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 41
{"method":"sni_get","params":null,"id":1}
POST /request/service/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}
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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_get","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_get","params":null,"id":1}' --quiet -O -
{"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}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_get","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_get","params":null,"id":1}'
{"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}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"sni_get","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_get","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":1100,"port":443,"hostname":None,"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":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_get","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"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}
{
"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
}
null
sni_link_add
Add single SNI certificate-hostname record. If same link (port-hostname) exists - it will be overwritten
Added
Parameters
Number
port, Number
certificate id, String
hostname or NULL
(for default hostname)
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 69
X-Qrator-Auth: aabbccddeeff
{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 369
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}' --quiet -O -
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}'
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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":None,"domain_id":1,"certificate":320}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_add","params":[443,320,"www.example.com"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"link_id":1103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":320},{"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}
{
"result": [
{
"link_id": 1103,
"port": 443,
"hostname": "www.example.com",
"domain_id": 1,
"certificate": 320
},
{
"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
}
[
443,
320,
"www.example.com"
]
sni_link_remove
Remove single SNI certificate-hostname record.
Added
Parameters
Number
link id
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
{"method":"sni_link_remove","params":[1103],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 51
X-Qrator-Auth: aabbccddeeff
{"method":"sni_link_remove","params":[1103],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 280
{"result":[{"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}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_link_remove","params":[1103],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_link_remove","params":[1103],"id":1}' --quiet -O -
{"result":[{"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}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_link_remove","params":[1103],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_link_remove","params":[1103],"id":1}'
{"result":[{"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}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"sni_link_remove","params":[1103],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_link_remove","params":[1103],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"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":None,"domain_id":1,"certificate":320}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_remove","params":[1103],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_link_remove","params":[1103],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"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}
{
"result": [
{
"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
}
[
1103
]
sni_set
Sets full SNI-state (set of links) for resource.
Added
Parameters
Return Values
Example
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 201
{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 201
X-Qrator-Auth: aabbccddeeff
{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 282
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}' --quiet -O -
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}'
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":None},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":None},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":[{"link_id":2101,"port":443,"hostname":None,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"sni_set","params":[{"port":443,"certificate":420,"hostname":null},{"port":443,"certificate":420,"hostname":"example.com"},{"port":443,"certificate":421,"hostname":"www.example.com"}],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":[{"link_id":2101,"port":443,"hostname":null,"domain_id":1,"certificate":420},{"link_id":2102,"port":443,"hostname":"example.com","domain_id":1,"certificate":420},{"link_id":2103,"port":443,"hostname":"www.example.com","domain_id":1,"certificate":421}],"error":null,"id":1}
{
"result": [
{
"link_id": 2101,
"port": 443,
"hostname": null,
"domain_id": 1,
"certificate": 420
},
{
"link_id": 2102,
"port": 443,
"hostname": "example.com",
"domain_id": 1,
"certificate": 420
},
{
"link_id": 2103,
"port": 443,
"hostname": "www.example.com",
"domain_id": 1,
"certificate": 421
}
],
"error": null,
"id": 1
}
[
{
"port": 443,
"certificate": 420,
"hostname": null
},
{
"port": 443,
"certificate": 420,
"hostname": "example.com"
},
{
"port": 443,
"certificate": 421,
"hostname": "www.example.com"
}
]
Troubleshoot
ip_status
Checks status of given IP address.
Added
Parameters
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
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
{"method":"ip_status","params":["198.51.100.12"],"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 56
X-Qrator-Auth: aabbccddeeff
{"method":"ip_status","params":["198.51.100.12"],"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 42
{"result":"NotBanned","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"ip_status","params":["198.51.100.12"],"id":1}' --quiet -O -
{"result":"NotBanned","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"ip_status","params":["198.51.100.12"],"id":1}'
{"result":"NotBanned","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"ip_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ip_status","params":["198.51.100.12"],"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"NotBanned","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ip_status","params":["198.51.100.12"],"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"NotBanned","error":null,"id":1}
{
"result": "NotBanned",
"error": null,
"id": 1
}
[
"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
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
{"method":"ping","params":null,"id":1}
POST /request/service/1 HTTP/1.0
Host: api.qrator.net
Content-Type: application/json
Content-Length: 38
X-Qrator-Auth: aabbccddeeff
{"method":"ping","params":null,"id":1}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37
{"result":"pong","error":null,"id":1}
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' \
--post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
$ wget https://api.qrator.net/request/service/1 \
--header='Content-Type: application/json' --header="X-Qrator-Auth: aabbccddeeff"
--post-data '{"method":"ping","params":null,"id":1}' --quiet -O -
{"result":"pong","error":null,"id":1}
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' \
--data '{"method":"ping","params":null,"id":1}'
$ curl https://api.qrator.net/request/service/1 \
-H 'Content-Type: application/json' -H "X-Qrator-Auth: aabbccddeeff" \
--data '{"method":"ping","params":null,"id":1}'
{"result":"pong","error":null,"id":1}
import requests
url="https://api.qrator.net/request/service/1"
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, json=payload).json()
print(res)
import requests
url="https://api.qrator.net/request/service/1"
headers={"x-qrator-auth": "aabbccddeeff"}
payload={"method":"ping","params":None,"id":1}
res=requests.post(url, headers=headers, json=payload).json()
print(res)
{"result":"pong","error":None,"id":1}
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json"
]
]
]
)
);
echo file_get_contents(
"https://api.qrator.net/request/service/1",
false,
stream_context_create(
[
"http" => [
"content" => '{"method":"ping","params":null,"id":1}',
"method" => "POST",
"header" => [
"Content-Type: application/json",
"x-qrator-auth": "aabbccddeeff"
]
]
]
)
);
{"result":"pong","error":null,"id":1}
{
"result": "pong",
"error": null,
"id": 1
}
null
Support
If already you are Qrator client - please use ticket system at personal dashboard.
Otherwise feel free to contact our support via mail support@qrator.net
Changelog
v1.4.7
Oct 01 2024
- Added number of IPs banned by custom-rules for type StatisticsCurrentIP
Added
- Added
blacklist.custom
field toStatisticsCurrentIP
v1.4.6
Aug 13 2024
Added
- Added
CertificateReplace
type - Added method
client::certificate_replace
v1.4.5
May 03 2024
- Update methods
domain::statistics_get
,domain::statistics_get_lite
,service::statistics_get
andservice::statistics_get_lite
to use actual statistics storage
v1.4.4
Apr 17 2024
- Added field port
IPPort
for methodtroubleshoot::troubleshoot_traceroute
Added
v1.4.3
Sep 11 2023
- Added field policy_groups
Contact
,ContactCreateObject
,ContactList
for methods:- Client
-
client::contact_create
-
client::contacts_get
-
- Client
Added
- Added
PolicyGroupList
type - Added method
client::policy_groups_get
v1.4.2
Jul 30 2023
- Minor backend updates
v1.4.1
Jun 30 2023
Added
- Added
CertificateSniState
type - Added method
domain::sni_set
- Added method
domain::sni_clear
- Added method
service::sni_set
- Added method
service::sni_clear
v1.4.0
Jun 28 2023
Added
- Added method
client::whitelist_relay_append
- Added method
domain::whitelist_relay_append
- Added method
service::whitelist_relay_append
v1.3.16
Jun 22 2023
- Minor backend updates for speedup whitelist- and blacklist- methods
v1.3.15
Apr 13 2023
- Minor documentation fixes
v1.3.14
Feb 15 2023
Added
- Added method
client::login_link
v1.3.13
Feb 13 2023
Added
- Added
ContactCreateObject
type - Added method
client::contact_create
v1.3.12
07 Feb 2022
Added
- Added method
client::whitelist_append
- Added method
client::whitelist_remove
v1.3.11
20 Jan 2023
- Minor backend updates
v1.3.10
20 Jan 2023
- Fix method
:statistics_current_http
:errors.total
now includes 4xx errors.
v1.3.9
11 Oct 2022
- Minor updates for
domain::not_whitelisted_policy_get
anddomain::not_whitelisted_policy_set
methods
v1.3.8
28 Jul 2022
- Minor backend fixes
v1.3.7
15 Jul 2022
- Added support for
TimedIp
with comments for methods:- Domain
-
domain::whitelist_get
-
domain::whitelist_append
-
- Service
-
service::whitelist_get
-
service::whitelist_append
-
- Domain
Added
- Added method
domain::whitelist_count
- Added method
domain::whitelist_flush
- Added method
service::whitelist_count
- Added method
service::whitelist_flush
v1.3.6
14 Jul 2022
- Some documentation fixes.
Added
- Added
errors.4xx
field toStatisticsCurrentHTTP
v1.3.5
06 Jul 2022
- Added methods to blacklist IP on all client domains
Added
- Added method
client::blacklist_append
- Added method
client::blacklist_remove
- Added method
client::blacklist_relay_ban
v1.3.4
17 Jun 2022
- Added method to remove certificate from Certificate storage
Added
- Added
Qrator503Con
field toStatisticsCurrentBlocks
- Added
Qrator503Req
field toStatisticsCurrentBlocks
v1.3.3
10 Jun 2022
- Added method to remove certificate from Certificate storage
Added
- Added method
client::certificate_remove
v1.3.2
13 May 2022
- Minor validation fixes
v1.3.1
14 Apr 2022
- Added method for latest DNS-statistics snapshot
Added
- Added
StatisticsCurrentDNS
type - Added method
domain::statistics_current_dns
- Added method
service::statistics_current_dns
v1.3.0
28 Mar 2022
- Added support for
TimedIp
with comments for methods:- Domain
-
domain::blacklist_get
-
domain::blacklist_append
-
- Service
-
service::blacklist_get
-
service::blacklist_append
-
- Domain
Added
- Added
TimedIpMode
type
v1.2.9
Feb 10 2022
- Minor documentation updates
Added
- Added method
client::certrequest_le
v1.2.8
Dec 21 2021
Added
- Added
StringList
type - Added method
client::certificate_get
- Added method
client::certrequest_get
v1.2.7
Nov 16 2021
Added
- Added method
service::status_set
v1.2.6
Aug 10 2021
Added
- Added method
domain::blacklist_count
- Added method
service::blacklist_count
v1.2.5
Mar 24 2021
- Updated internal error handling
v1.2.4
Mar 4 2021
- Minor backend fixes
v1.2.3
Feb 24 2021
- Fixed examples for method
client::domains_get
v1.2.2
Dec 01 2020
Added
- Added
StatisticsCurrentBlocks
type - Added
StatisticsCurrentLocations
type - Added method
domain::statistics_current_blocks
- Added method
domain::statistics_current_locations
- Added method
service::statistics_current_blocks
- Added method
service::statistics_current_locations
v1.2.1
Sep 23 2020
- Added methods for our Certificate Storage
- Added methods for SNI configuration
- Common workflow to add
PEM
certificate and use it with SNI:- Create certificate request by calling
client::certrequest_upload
- Wait until certificate request change it status from
new
todone
, you can retrieve certificate request list by callingclient::certrequest_list
- Check processed certificate chains
- Add chain to Certificate Storage by calling
client::certrequest_install
- Check your certificate at Certificate Storage with
client::certificate_list
- Configure SNI with methods
- Domain
-
domain::sni_get
-
domain::sni_link_add
-
domain::sni_link_remove
-
- Service
-
service::sni_get
-
service::sni_link_add
-
service::sni_link_remove
-
- Domain
- Create certificate request by calling
Added
- Added
Certificate
type - Added
CertificateList
type - Added
CertificateLink
type - Added
CertificateLinkList
type - Added
CertificateRequest
type - Added
CertificateRequestList
type - Added method
client::certificate_list
- Added method
client::certrequest_list
- Added method
client::certrequest_upload
- Added method
client::certrequest_install
- Added method
client::certrequest_remove
- Added method
domain::sni_get
- Added method
domain::sni_link_add
- Added method
domain::sni_link_remove
- Added method
service::sni_get
- Added method
service::sni_link_add
- Added method
service::sni_link_remove
v1.1.11
Sep 23 2020
- Some minor documentation fixes.
- Minor backend stability updates
v1.1.10
May 28 2020
- Response headers documentation update.
v1.1.9
Mar 26 2020
- Fixed parameter handling for
service_ports_set
andservice_ports_test
methods.
v1.1.8
Jan 21 2020
Added
- Added
AccessPolicy
type - Added method
domain::not_whitelisted_policy_set
- Added method
domain::not_whitelisted_policy_get
- Added method
service::not_whitelisted_policy_set
- Added method
service::not_whitelisted_policy_get
v1.1.7
Dec 17 2019
- Auth backend fixes
v1.1.6
Nov 08 2019
- Fixed some links in documentation
v1.1.5
Nov 06 2019
- Minor backend updates
v1.1.4
Sep 29 2019
- API forcing clients to use
HTTPS
- Transport section. - Added HTTP 426 Error
v1.1.3
Aug 02 2019
- Corrected parameters parsing for TimedIpList - when single TimedIp passed instead of TimedIpList. Now single TimedIp will be converted to TimedIpList.
v1.1.2
Jul 24 2019
- Major backend updates, fixes and some refactoring:
Added
- Added
Month
type - Added
StatisticsCurrentIP
type - Added
StatisticsCurrentHTTP
type - Added method
domain::name_get
- Added method
domain::name_set
- Added method
domain::statistics_billable
- Added method
domain::statistics_current_http
- Added method
domain::statistics_current_ip
- Added method
service::name_set
- Added method
service::name_get
- Added method
service::statistics_billable
- Added method
service::statistics_current_http
- Added method
service::statistics_current_ip
Deprecated
- Deprecated method
domain::domain_name_get
- Deprecated method
domain::domain_name_set
- Deprecated method
domain::statistics_get
- Deprecated method
domain::statistics_get_lite
- Deprecated method
service::service_name_set
- Deprecated method
service::service_name_get
- Deprecated method
service::statistics_get
- Deprecated method
service::statistics_get_lite
Removed
- Removed method
domain::test_iplist
- Removed method
domain::test_timediplist
- Removed method
service::test_iplist
- Removed method
service::test_timediplist
v1.0.27
Jun 25 2019
Removed
- Removed method
domain::whitequeue_append
- Removed method
domain::whitequeue_flush
- Removed method
domain::whitequeue_get
- Removed method
domain::whitequeue_get_max_size
- Removed method
domain::whitequeue_get_size
- Removed method
domain::whitequeue_remove
- Removed method
domain::whitequeue_set_max_size
v1.0.26
Jun 10 2019
- Minor updates of request handler
v1.0.25
May 30 2019
- Documentation fixes
v1.0.24
May 29 2019
- Minor fixes
v1.0.23
May 29 2019
- Some documentation fixes
v1.0.22
Apr 16 2019
- Minor backend updates
v1.0.21
Feb 14 2019
- Major improvements for
blacklist_...
methods
v1.0.20
Dec 18 2018
- Minor backend updates
v1.0.19
Sep 12 2018
Added
- Added method
domain::blacklist_get
v1.0.18
Mar 01 2018
- Minor backend updates
v1.0.17
Feb 27 2018
Added
- Token-Auth authorization mode
v1.0.15
Dec 4 2017
Added
- Added
ContactList
type - Added method
client::contacts_get
v1.0.14
Oct 9 2017
Added
- Added
ports
field toDomainList
v1.0.13
Aug 16 2017
Added
- Added method
client::blacklist_check
- Added method
client::blacklist_status
- Added method
client::ip_status
v1.0.12
Jun 28 2017
- We are planning to drop support for HTTP requests in favour of HTTPS, please update your applications.
Added
- For our clients and partners now available Debug methods - for testing purposes.
- Added method
debug::ping
- Added method
debug::test_iplist
- Added method
debug::test_timediplist
- Added method
debug::test_upstreamlist
- Added method
debug::service_ports_test
v1.0.11
Jun 27 2017
Added
- Added
ServiceProto
type - Added
ServicePorts
type - Added method
service::service_status_get
- Added method
service::service_ip_test
- Added method
service::service_ip_get
- Added method
service::service_ip_set
- Added method
service::service_ports_test
- Added method
service::service_ports_get
- Added method
service::service_ports_set
- Added method
service::whitelist_get
- Added method
service::whitelist_append
- Added method
service::whitelist_remove
- Added method
service::blacklist_append
- Added method
service::blacklist_remove
- Added method
service::blacklist_check
- Added method
service::blacklist_status
- Added method
service::blacklist_flush
- Added method
service::statistics_get
- Added method
service::ip_status
- Added method
service::ping
v1.0.10
Apr 19 2017
Added
- Added
NetworkList
type - Added method
client::source_ips_get
v1.0.9
Apr 11 2017
Added
- Added
ban_api
field toStatisticsResponse
- Added
ban_waf
field toStatisticsResponse
v1.0.8
Feb 01 2017
Added
- Added method
domain::test_iplist
- Added method
domain::test_timediplist
v1.0.7
Dec 23 2016
Added
- Added method
domain::ip_status
v1.0.6
Dec 07 2016
Added
- Added
ban_geo
field toStatisticsResponse
v1.0.5
Nov 17 2016
Added
- Added
UpstreamConfiguration
type - Added method
domain::domain_status_get
- Added method
domain::domain_ip_get
- Added method
domain::domain_ip_get_json
- Added method
domain::domain_ip_test
- Added method
domain::domain_ip_set
v1.0.4
Sep 20 2016
Added
- Added
DomainList
type - Added method
client::domains_get
v1.0.3
Aug 10 2016
Added
- Added
TimedIP
type - Added
TimedIPList
type -
domain::whitelist_append
acceptsTimedIPList
-
domain::blacklist_append
acceptsTimedIPList
v1.0.2
Aug 2 2016
Added
- Added method
domain::blacklist_status