Klikk

Transforming the cloud for the good of the planet.

REST – JSON API

Klikk’s API is open for all customers with accepted credit or customers with topped up credits in their accounts.
The API endpoint is: https://my.klikk.com/api (HTTP Authentication).

Order Request

{
  "action": "order_create",
  "items": [
    {
      "name": "My testserver 1",
      "product": {
        "name": "VPS",
        "options": {
          "quantity_ram_gb": 0.5,
          "quantity_cpu": 9,
          "quantity_storage_gb": 25,
          "os": 2,
          "features": {
            "ipv4": 1,
            "sshd": {
              "authorized_keys": "ssh-rsa ......",
              "ip_allow": "fec0:aaa:1:2::ff,192.168.0.0/24",
              "public_ports_allow": "80,443,12000:12010"
            }
          }
        }
      }
    }
  ],
  "reference": "Optional order reference"
}

Return data is HTTP 2xx JSON with created order id. HTTP response codes other than 2xx is an error
If your profile do not have enough credit, you might get a response asking for payment. The invoice is already created if so.

Order Response Example

{"order_id": 73, "status": 200, "message": "Order is being processed"}


Order Status

{
  "action": "order_status",
  "order_id": NNNN
}

Order Status Response Example

{
  "order_id": 73,
  "status": 200,
  "message": "Order is being processed",

  "order_items": [
    {
      "id": 1293,
      "status": 200,
      "name": "VPS",
      "reference": "My testserver 1",
      "message": "Order is being processed"
    }
  ]
}

Order List

List all orders

{
  "action": "order_list"
}

Order Cancel

Cancel the entire order

{
  "action": "order_cancel",
  "order_id": NNNN
}

Cancel an item of the order

{
  "action": "order_cancel",
  "order_id": NNNN,
  "order_item_id": NNNN
}

The order items will not be renewed and will be cancelled after end period.
Response is an empty 200 OK, or 404 not found for not found.


Server List

List all servers

{
  "action": "server_list",
  "order_item_id": 0 // 0 or blank for all servers
}


Status codes

  • 9xx – order is cancelled
  • 2xx – pending creation
  • 1xx – payment required or processing. Go to billing menu to view invoices
  • 0 – order is fully completed