Use API

Certain site features are accessible through the API. The API_KEY is required for queries, which can be obtained in your control panel after registration.

For GET authentication, the following parameter is added to the query: '?apikey=[API_KEY]'.
For POST queries, the parameter 'apikey' is added to POST.

API responses

If successful, the response is returned to JSON. If there are errors in the query parameters, the error description will be returned in the 'error' field.

HTTP code Description
200 Reply received
403 Access denied: 'API_KEY' is not specified or there is insufficient permission for the function you requested.
5xx Server error. Something went wrong. We've been notified of the bug and will fix it soon.

Account

Balance

URL: /api/account/balance
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/account/balance", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/account/balance" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "balance": 91.0,
  "currency": "EUR"
}

Info

URL: /api/account/info
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/account/info", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/account/info" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "email": "example@fornex.com",
  "name": "Example Account"
}

Invoices

URL: /api/account/invoices
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/account/invoices", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/account/invoices" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "unpaid_invoices_count": 1,
  "unpaid_invoices_amount": 100,
  "currency": "EUR"
}

Orders

List of orders

URL: /api/orders/list
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/orders/list", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/orders/list" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "cost_month": 148.0,
    "expiration_date": "2015-12-18T17:21:46",
    "id": "34-1234",
    "ipaddress_set": [
      "123.123.123.123"
    ],
    "name": "user-defined-name",
    "hostname": "srv-123.fornex.org",
    "status": "active",
    "tariff": "VPS Master",
    "tariff_id": 33,
    "tariff_price": 140,
    "type": "vps"
  }
]

Plans

Backups

URL: /api/plans/backups
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/plans/backups", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/plans/backups" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "price": 3.0,
    "space": 100,
    "units": "Gb"
  },
  {
    "price": 4.5,
    "space": 150,
    "units": "Gb"
  },
  {
    "price": 6.0,
    "space": 200,
    "units": "Gb"
  }
]

Dedicated servers

URL: /api/plans/dedicated
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/plans/dedicated", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/plans/dedicated" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "bandwidth": "1 Gbit/s",
    "cpu_model": "Intel Xeon E3-1270 (4×3.4Ghz)",
    "cpu_count": 1,
    "disk": "4 × 300 GB SAS 15k",
    "name": "DS XeonSAS",
    "id": 101,
    "price": 198.0,
    "ram": "16 GB",
    "location": "DE"
  }
]

VPN

URL: /api/plans/vpn
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/plans/vpn", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/plans/vpn" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "available_locations": [
      "DE",
      "NL",
      "US",
      "RU"
    ],
    "type": "dedicated",
    "id": 1,
    "price": 10.0
  }
]

Virtual servers

URL: /api/plans/vps
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/plans/vps", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/plans/vps" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "bandwidth": "100 Mbit/s",
    "cpu_count": 1,
    "disk": "10 GB",
    "id": 433,
    "name": "SSD Cloud 1GB",
    "price": 5.0,
    "ram": "1 GB"
  }
]

Web Hosting

URL: /api/plans/hosting
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/plans/hosting", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/plans/hosting" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "available_locations": [
      "DE",
      "RU"
    ],
    "cpu_cores": 1,
    "databases": 2,
    "hdd_space": 1000,
    "mail_domains": 2,
    "mailboxes": 20,
    "name": "VH-SSD-2",
    "id": 33,
    "price": 1.0,
    "sites": 2
  }
]

VPS

Command execution details

URL: /api/vps/log_details/[order_id]/
Query method: GET
URL parameters:

  • order_id - order number

Query parameters:

  • log_id - record id

Query example:
import requests  
requests.get("https://fornex.com/api/vps/log_details/34-1234/", {  
  "log_id": 222287,
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/log_details/34-1234/" --get\
  --data "log_id=222287&apikey=PERSONAL_API_KEY"
Response example:
{
  "action": "Set root password",
  "completed": false,
  "job_action": "set_root_passwd",
  "job_state": "ready",
  "note": "Resetting root password",
  "pk": 222287,
  "time": "03.01.2019 11:10",
  "user": "username"
}

Disable

URL: /api/vps/stop/[order_id]/
Query method: POST
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.post("https://fornex.com/api/vps/stop/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/stop/34-177054/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": "True"
}
Additional:

`Ok` field of the response contains the request status.

Enable

URL: /api/vps/start/[order_id]/
Query method: POST
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.post("https://fornex.com/api/vps/start/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/start/34-177054/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": "True"
}
Additional:

`Ok` field of the response contains the request status.

Hard reset

URL: /api/vps/hard_reset/[order_id]/
Query method: POST
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.post("https://fornex.com/api/vps/hard_reset/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/hard_reset/34-177054/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": "True"
}
Additional:

`Ok` field of the response contains the request status.

Reboot

URL: /api/vps/restart/[order_id]/
Query method: POST
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.post("https://fornex.com/api/vps/restart/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/restart/34-177054/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": "True"
}
Additional:

`Ok` field of the response contains the request status.

Reset root password

URL: /api/vps/passwd_reset/[order_id]/
Query method: GET
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.get("https://fornex.com/api/vps/passwd_reset/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/passwd_reset/34-177054/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "resp_id": 1234,
  "passwd": "newstrongpassword"
}
Additional:

`passwd` - new password.
`resp_id` - command ID in logs for checking the request status, see vps_log_details

Statistics

URL: /api/vps_stat/[order_id]/[field]/[start]--[end].json
Query method: GET
URL parameters:

  • order_id - order number
  • field - statistics field ['cpu'|'memory'|'traffic'|'disk'|'inodes'|'io']
  • start - start date
  • end - end date

Query example:
import requests  
requests.get("https://fornex.com/api/vps_stat/34-177054/traffic/2015-11-16--2015-11-17.json", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps_stat/34-177054/traffic/2015-11-16--2015-11-17.json" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "series": [
    {
      "color": "#60B5FF",
      "data": [
        61410.9215552,
        65379.49276,
        67115.7455904
      ],
      "name": "Incoming",
      "pointEnd": 1447773600000,
      "pointInterval": 300000,
      "pointStart": 1447687200000
    },
    {
      "color": "#61D561",
      "data": [
        4585.92634648,
        4575.14841552,
        4636.41519648
      ],
      "name": "Outgoing",
      "pointEnd": 1447773600000,
      "pointInterval": 300000,
      "pointStart": 1447687200000,
      "type": "areaspline"
    }
  ],
  "subtitle": "November 16, 2015, 17:18 - November 17, 2015, 17:18 (Europe / Moscow)"
}
Additional:

Поле `series` ответа структурированно в формате для Highcharts, параметры `pointStart`, `pointEnd`, указывают начало и конец в формате `unixtime * 1000`, `pointInterval` - интервал между значениями в поле data.

Status

URL: /api/vps/status/[order_id]/
Query method: GET
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.get("https://fornex.com/api/vps/status/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vps/status/34-177054/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "status": "off"
}
Additional:

`Status` field in the response contains the VPS status.

SSH

Add key

URL: /api/ssh_keys/add/
Query method: POST
Query parameters:

  • title - key name
  • key - key

Query example:
import requests  
requests.post("https://fornex.com/api/ssh_keys/add/", {  
  "title": "test key",
  "key": "ssh-rsa tt3BPrBTUCasdasdGXsCXmiF03LD/f9 test@test",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/add/" \
  --data "title=test+key&key=ssh-rsa+tt3BPrBTUCasdasdGXsCXmiF03LD%2Ff9+test%40test&apikey=PERSONAL_API_KEY"
Response example:
{
  "date": "December 19, 2017",
  "id": 67,
  "key": "ssh-rsa tt3BPrBTUCGXsCXmiF03LD/f9 test@test",
  "title": "test@test"
}

Add key to order

URL: /api/ssh_keys/[order_id]/add/
Query method: POST
URL parameters:

  • order_id - order number

Query parameters:

  • key_pk - key id

Query example:
import requests  
requests.post("https://fornex.com/api/ssh_keys/34-177054/add/", {  
  "key_pk": "99",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/34-177054/add/" \
  --data "key_pk=99&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

Delete key

URL: /api/ssh_keys/delete/
Query method: POST
Query parameters:

  • key_pk - key id

Query example:
import requests  
requests.post("https://fornex.com/api/ssh_keys/delete/", {  
  "key_pk": "74",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/delete/" \
  --data "key_pk=74&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

Delete order key

URL: /api/ssh_keys/[order_id]/delete/
Query method: POST
URL parameters:

  • order_id - order number

Query parameters:

  • key_pk - key id

Query example:
import requests  
requests.post("https://fornex.com/api/ssh_keys/34-177054/delete/", {  
  "key_pk": "74",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/34-177054/delete/" \
  --data "key_pk=74&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

List of order keys

URL: /api/ssh_keys/[order_id]/
Query method: GET
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.get("https://fornex.com/api/ssh_keys/34-177054/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/34-177054/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "date": "December 19, 2017",
    "id": 67,
    "key": "ssh-rsa tt3BPrBTUCGXsCXmiF03LD/f9 test@test",
    "title": "test@test"
  }
]

List of user keys

URL: /api/ssh_keys/
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/ssh_keys/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ssh_keys/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "date": "December 19, 2017",
    "id": 67,
    "key": "ssh-rsa tt3BPrBTUCGXsCXmiF03LD/f9 test@test",
    "title": "test@test"
  }
]

Tickets

Configure webhook

A POST request

ContentType: 'application/json'
{text: 'New comment added to the ticket...'}

will be sent to the specified URL. By default, it works with Slack, but you can specify your own webhook and process the notification on your own.

URL: /api/tickets/webhook_set/
Query method: POST
Query parameters:

  • url - URL for submitting request, leave blank to deactivate

Query example:
import requests  
requests.post("https://fornex.com/api/tickets/webhook_set/", {  
  "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/tickets/webhook_set/" \
  --data "url=https%3A%2F%2Fhooks.slack.com%2Fservices%2FT00000000%2FB00000000%2FXXXXXXXXXXXXXXXXXXXXXXXX&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

webhook status

URL: /api/tickets/webhook_info/
Query method: GET
Query example:
import requests  
requests.get("https://fornex.com/api/tickets/webhook_info/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/tickets/webhook_info/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "last_error_date": null,
  "last_error_message": null,
  "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
}

VPN

Download config

URL: /api/vpn/[order]/config-[proto].ovpn
Query method: GET
URL parameters:

  • order - order number
  • proto - protocol ['tcp'|'udp']

Query example:
import requests  
requests.get("https://fornex.com/api/vpn/301-12312/config-udp.ovpn", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/vpn/301-12312/config-udp.ovpn" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
 client
 dev tun
 <connection>
    remote 209.222.104.210 443 udp
 </connection>
 ...
 

DNS

Add domain

Protected method

To use this method, please contact technical support and request sufficient rights to edit the DNS.

URL: /api/dns/v0.1/add_domain/
Query method: POST
Query parameters:

  • name - Domain name
  • ip - IP

Query example:
import requests  
requests.post("https://fornex.com/api/dns/v0.1/add_domain/", {  
  "name": "example.com",
  "ip": "127.0.0.1",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/add_domain/" \
  --data "name=example.com&ip=127.0.0.1&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true,
  "name": "example.com"
}

Add record

URL: /api/dns/v0.1/[name]/entry_set/add/
Query method: POST
URL parameters:

  • name - domain

Query parameters:

  • host - Record hostname: '@, *, subdomain'
  • type - Тип записи: [`A`|`AAAA`|`TXT`|`CNAME`|`NS`|`MX`|`SRV`|`CAA`]
  • value - Record value according to type, for example IP for A records
  • ttl - Время жизни (не обязательное, по умолчанию: 3600 сек.): [`120`(2 мин.) |`300`(5 мин.) |`600`(10 мин.) |`900`(15 мин.) |`1800`(30 мин.) |`3600`(1 час) |`7200`(2 часа) |`18000`(5 часов) |`43200`(12 часов) |`86400`(1 день) ]
  • prio - Priority, used only for SRV and MX

Query example:
import requests  
requests.post("https://fornex.com/api/dns/v0.1/example.com/entry_set/add/", {  
  "host": "example",
  "type": "A",
  "value": "1.2.3.4",
  "ttl": "600",
  "prio": "5",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/entry_set/add/" \
  --data "host=example&type=A&value=1.2.3.4&ttl=600&prio=5&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true,
  "pk": 123
}

Delete domain

Protected method

To use this method, please contact technical support and request sufficient rights to edit the DNS.

URL: /api/dns/v0.1/[name]/delete_domain/
Query method: POST
URL parameters:

  • name - domain

Query example:
import requests  
requests.post("https://fornex.com/api/dns/v0.1/example.com/delete_domain/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/delete_domain/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

Delete record

URL: /api/dns/v0.1/[name]/entry_set/[pk]/delete/
Query method: POST
URL parameters:

  • name - domain
  • pk - Record ID

Query example:
import requests  
requests.post("https://fornex.com/api/dns/v0.1/example.com/entry_set/366182/delete/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/entry_set/366182/delete/" \
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

Domain list

URL: /api/dns/v0.1/domain_list.json
Query method: GET
Query parameters:

  • q - search by name or IP
  • tag - filter by tag

Query example:
import requests  
requests.get("https://fornex.com/api/dns/v0.1/domain_list.json", {  
  "q": "10.10.10.18",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/domain_list.json" --get\
  --data "q=10.10.10.18&apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "name": "test.com",
    "created": "2013-04-16T19:07:10",
    "updated": "2017-02-05T21:41:25",
    "entry_set": [
      {
        "host": "",
        "id": 366182,
        "type": "A",
        "ttl": null,
        "value": "10.10.10.18"
      }
    ],
    "tags": []
  }
]

Domain records

URL: /api/dns/v0.1/[name]/entry_set.json
Query method: GET
URL parameters:

  • name - domain

Query parameters:

  • q - record filter

Query example:
import requests  
requests.get("https://fornex.com/api/dns/v0.1/example.com/entry_set.json", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/entry_set.json" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "entry_set": [
    {
      "id": 12344,
      "host": "",
      "prio": null,
      "type": "A",
      "ttl": 600,
      "value": "127.0.0.1"
    },
    {
      "id": 12345,
      "host": "",
      "type": "MX",
      "prio": 1,
      "ttl": null,
      "value": "aspmx.l.google.com"
    }
  ]
}

Update record

URL: /api/dns/v0.1/[name]/entry_set/[pk]/
Query method: POST
URL parameters:

  • name - domain
  • pk - Record ID

Query parameters:

  • host - Record hostname: '@, *, subdomain'
  • type - Тип записи: [`A`|`AAAA`|`TXT`|`CNAME`|`NS`|`MX`|`SRV`|`CAA`]
  • value - Record value according to type, for example IP for A records
  • ttl - Время жизни (не обязательное, по умолчанию: 3600 сек.): [`120`(2 мин.) |`300`(5 мин.) |`600`(10 мин.) |`900`(15 мин.) |`1800`(30 мин.) |`3600`(1 час) |`7200`(2 часа) |`18000`(5 часов) |`43200`(12 часов) |`86400`(1 день) ]
  • prio - Priority, used only for SRV and MX

Query example:
import requests  
requests.post("https://fornex.com/api/dns/v0.1/example.com/entry_set/366182/", {  
  "host": "example",
  "type": "A",
  "value": "1.2.3.4",
  "ttl": "600",
  "prio": "5",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/entry_set/366182/" \
  --data "host=example&type=A&value=1.2.3.4&ttl=600&prio=5&apikey=PERSONAL_API_KEY"
Response example:
{
  "ok": true
}

Zone file

URL: /api/dns/v0.1/[name]/zone_file/
Query method: GET
URL parameters:

  • name - domain

Query example:
import requests  
requests.get("https://fornex.com/api/dns/v0.1/example.com/zone_file/", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/dns/v0.1/example.com/zone_file/" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
$TTL 21600
@	IN	SOA	ns1.fornex.com. hostmaster.fornex.com. (
...

Domains

Change NS

URL: /api/change_ns/[order_id]/
Query method: POST
URL parameters:

  • order_id - order number

Query parameters:

  • nss - List of NS, separated by a comma

Query example:
import requests  
requests.post("https://fornex.com/api/change_ns/375-13/", {  
  "nss": "ns1.company.com,ns2.company.com",
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/change_ns/375-13/" \
  --data "nss=ns1.company.com%2Cns2.company.com&apikey=PERSONAL_API_KEY"
Response example:
[
  {
    "ok": true
  }
]

Dedicated servers

Traffic

URL: /api/ds/34-[order_id]/traffic.json
Query method: GET
URL parameters:

  • order_id - order number

Query parameters:

  • period - period for displaying statistics ['month'|'year'], 'month' by default
  • port - sequential port number, '0' by default

Query example:
import requests  
requests.get("https://fornex.com/api/ds/34-1234/traffic.json", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ds/34-1234/traffic.json" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "data": [
    [
      "2015-11-11",
      {
        "input": 41348840999.42331,
        "output": 969929788001.3163
      }
    ],
    [
      "2015-11-12",
      {
        "input": 44384423647.10196,
        "output": 1019910108491.1565
      }
    ]
  ],
  "order": "34-1234 DS HyperXeon (example.net)",
  "period": "month"
}
Additional:

Response: 'input', 'output' - traffic in bytes.

Traffic limits

URL: /api/ds/34-[order_id]/traffic_used.json
Query method: GET
URL parameters:

  • order_id - order number

Query example:
import requests  
requests.get("https://fornex.com/api/ds/34-1234/traffic_used.json", {  
  "apikey": "PERSONAL_API_KEY"
})
$ curl "https://fornex.com/api/ds/34-1234/traffic_used.json" --get\
  --data "apikey=PERSONAL_API_KEY"
Response example:
{
  "limit": 14293651161088.0,
  "order": "34-1234 DS XeonNeon (example.net)",
  "range_end": "2015-11-21",
  "range_start": "2015-10-21",
  "used": 3508146044885.079,
  "used_rate": 0.24543386468220252
}