NAV
GigaCloud
bash php python

Introduction

Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns

Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.

Authentication

To authorize, use this code:

# With bash, you can just pass the correct header with each request
                curl 'https://my.gigacloud.ua/api' \
                  -u "username:passowrd"
                
//We recommend to use Requests library available at https://github.com/rmccue/Requests
                require_once 'Requests.php';
                Requests::register_autoloader();

                $resp = Requests::get('https://my.gigacloud.ua/api/details', array(), array(
                    'auth' => array('username', 'passowrd')
                ));
                
# python requests module will handle basic authentication if provided with auth parameter
                import requests

                req = requests.get('https://my.gigacloud.ua/api/details', auth=('username', 'passowrd'))
                

Make sure to replace username and password with your client area details.

This API uses Basic HTTP Authentication.

To authenticate with API with your client area access details (email address as username and your client area password).

All API calls requires authentication, API expects for the auth to be included in a header that looks like the following:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

Clientarea

User Details

Return registration details for my account

curl "https://my.gigacloud.ua/api/details" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/details', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/details', auth=auth)
print(req.json())
Example Response:
{
    "client": {
        "id": "20408",
        "email": "email@example.com",
        "lastlogin": "2015-09-17 09:00:20",
        "ip": "10.10.10.100",
        "host": "unknown",
        "status": "Active",
        "parent_id": "0",
        "firstname": "John",
        "lastname": "Doe",
        "companyname": "Company name",
        "address1": "Addres 1",
        "address2": "Addres 2",
        "city": "City",
        "state": "Alabama",
        "postcode": "Post code",
        "country": "US",
        "phonenumber": "+01.222444111",
        "datecreated": "2015-03-16",
        "language": "english",
        "company": "1",
        "credit": "0.0000",
        "privileges": null
    }
}

HTTP Request

GET /details

Update User Details

Update registration details under my account

curl "https://my.gigacloud.ua/api/details" \
   -u user:pass \
   -d firstname="firstnameValue"\
   -d lastname="lastnameValue"\
   -d organizationid="organizationidValue"\
   -d phonenumber="phonenumberValue"\
   -d email="emailValue"\
   -d companyname="companynameValue"\
   -d address1="address1Value"\
   -d address2="address2Value"\
   -d city="cityValue"\
   -d state="stateValue"\
   -d postcode="postcodeValue"\
   -d country="countryValue"\
   -d type="typeValue"\
   -d editonce="editonceValue"\
   -d mobilephone="mobilephoneValue"\
   -d required="requiredValue"\
   -d requiredcheck="requiredcheckValue"
$data = array(
    'firstname' => 'firstnameValue',
    'lastname' => 'lastnameValue',
    'organizationid' => 'organizationidValue',
    'phonenumber' => 'phonenumberValue',
    'email' => 'emailValue',
    'companyname' => 'companynameValue',
    'address1' => 'address1Value',
    'address2' => 'address2Value',
    'city' => 'cityValue',
    'state' => 'stateValue',
    'postcode' => 'postcodeValue',
    'country' => 'countryValue',
    'type' => 'typeValue',
    'editonce' => 'editonceValue',
    'mobilephone' => 'mobilephoneValue',
    'required' => 'requiredValue',
    'requiredcheck' => 'requiredcheckValue'
);
$resp = Requests::post('https://my.gigacloud.ua/api/details', array(), $data, $options);

echo $resp->body;
payload = {
    'firstname' : 'firstnameValue',
    'lastname' : 'lastnameValue',
    'organizationid' : 'organizationidValue',
    'phonenumber' : 'phonenumberValue',
    'email' : 'emailValue',
    'companyname' : 'companynameValue',
    'address1' : 'address1Value',
    'address2' : 'address2Value',
    'city' : 'cityValue',
    'state' : 'stateValue',
    'postcode' : 'postcodeValue',
    'country' : 'countryValue',
    'type' : 'typeValue',
    'editonce' : 'editonceValue',
    'mobilephone' : 'mobilephoneValue',
    'required' : 'requiredValue',
    'requiredcheck' : 'requiredcheckValue'
}
req = requests.post('https://my.gigacloud.ua/api/details', params=payload, auth=auth)
print(req.json())

HTTP Request

POST /details

Query Parameters

Parameter Type Description
firstname string First Name
lastname string Last Name - afwf awf
organizationid string Organization ID
phonenumber string Phone
email string Email Address
companyname string Organization
address1 string Address 1 - Example description
address2 string Address 2
city string City
state string State
postcode string Post code
country string Country
type string Account Type
editonce string Edit once
mobilephone string Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1
required string RequiredByOrg
requiredcheck string RequiredCheck

Billing

Account balance

Get current account balance(unpaid invoices total), account credit

curl "https://my.gigacloud.ua/api/balance" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/balance', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/balance', auth=auth)
print(req.json())
Example Response:
{
  "details": {
    "acc_balance": "10.00",
    "acc_credit": "0.00"
  }
}

HTTP Request

GET /balance

List Invoices

List all invoices under my account

curl "https://my.gigacloud.ua/api/invoice" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/invoice', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/invoice', auth=auth)
print(req.json())
Example Response:
{
    "invoices": [
        {
            "id": "239780",
            "date": "2015-05-26",
            "duedate": "2015-05-26",
            "paybefore": "2015-05-26",
            "total": "10.00",
            "datepaid": "0000-00-00 00:00:00",
            "status": "Unpaid",
            "merge_id": null,
            "number": "239780",
            "currency": "USD"
        }
    ]
}

HTTP Request

GET /invoice

Invoice Details

Get invoice details

curl "https://my.gigacloud.ua/api/invoice/@id" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/invoice/@id', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/invoice/@id', auth=auth)
print(req.json())
Example Response:
{
    "invoice": {
        "id": "303090",
        "status": "Paid",
        "date": "2015-08-05",
        "duedate": "2015-08-05",
        "paybefore": "2015-08-05",
        "datepaid": "2015-09-10 13:13:37",
        "number": "2015-09-25",
        "currency": "USD",
        "subtotal": 58.5,
        "credit": 0,
        "tax": 0,
        "taxrate": 22,
        "tax2": 0,
        "taxrate2": 0,
        "taxexempt": "0",
        "total": 58.5,
        "rate": 1,
        "rate2": 0,
        "rate3": 1,
        "notes": "",
        "items": [
            {
                "id": "264330",
                "invoice_id": "303090",
                "type": "Hosting",
                "item_id": "33334",
                "description": "Hosting - Starter Hosting (2015.08.05 - 2015.09.04)",
                "amount": "58.50",
                "taxed": "0",
                "qty": "1.00",
                "linetotal": "58.50"
            }
        ],
        "client": {
            ...
        }
    }
}

HTTP Request

GET /invoice/@id

Query Parameters

Parameter Type Description
id int

Support

List Tickets

List support tickets under my account

curl "https://my.gigacloud.ua/api/tickets" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/tickets', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/tickets', auth=auth)
print(req.json())
Example Response:
{
    "tickets": [
        {
            "client_read": "1",
            "ticket_number": "437928",
            "date": "2015-05-12 12:01:45",
            "deptname": "Support Tickets",
            "subject": "Example Ticket",
            "status": "Open"
        }
    ]
}

HTTP Request

GET /tickets

Ticket details

Get ticket details, including all replies

curl "https://my.gigacloud.ua/api/tickets/@number" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/tickets/@number', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/tickets/@number', auth=auth)
print(req.json())
Example Response:
{
    "tickets": {
        "date": "2015-05-12 12:01:45",
        "ticket_number": "437928",
        "name": "John Doe",
        "email": "john@doe2.com",
        "subject": "Example Ticket",
        "status": "Open",
        "client_read": "1",
        "deptname": "Support"
    },
    "replies": [
        {
            "id": "57",
            "name": "Default User",
            "date": "2015-05-13 08:05:46",
            "body": "Example admin reply",
            "status": "Sent",
            "type": "Admin"
        },
        {
            "id": "58",
            "name": "John Doe",
            "date": "2015-05-13 08:06:07",
            "body": "Example client reply",
            "status": "Sent",
            "type": "Client"
        }
    ]
}

HTTP Request

GET /tickets/@number

Query Parameters

Parameter Type Description
number int Ticket number

Domains

List Domains

List domains under your account

curl "https://my.gigacloud.ua/api/domain" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/domain', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/domain', auth=auth)
print(req.json())
Example Response:
{
    "domains": [
        {
            "id": "548",
            "name": "example.com",
            "expires": "2016-08-04",
            "recurring_amount": "10.00",
            "date_created": "2015-08-04",
            "status": "Active",
            "period": "1",
            "autorenew": "1",
            "daytoexpire": "322"
        }
    ]
}

HTTP Request

GET /domain

Domain details

Get domain details

curl "https://my.gigacloud.ua/api/domain/@id" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/domain/@id', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/domain/@id', auth=auth)
print(req.json())
Example Response:
{
    "details": {
        "id": "548",
        "name": "example.com",
        "date_created": "2015-08-04",
        "firstpayment": "10.00",
        "recurring_amount": "10.00",
        "period": "1",
        "expires": "2016-08-04",
        "status": "Active",
        "next_due": "2016-08-04",
        "next_invoice": "2016-07-28",
        "idprotection": "0",
        "nameservers": [
            "ns1.example.com",
            "ns2.example.com",
            "ns3.example.com",
            ""
        ],
        "autorenew": "1"
    }
}

HTTP Request

GET /domain/@id

Query Parameters

Parameter Type Description
id int Domain id

Domain availability

Check if domain is available for registration. Returns status: "ok" if domain is available, empty response otherwise

curl "https://my.gigacloud.ua/api/domainorder/status" \
   -u user:pass \
   -d name="nameValue"
$data = array(
    'name' => 'nameValue'
);
$resp = Requests::post('https://my.gigacloud.ua/api/domainorder/status', array(), $data, $options);

echo $resp->body;
payload = {
    'name' : 'nameValue'
}
req = requests.post('https://my.gigacloud.ua/api/domainorder/status', params=payload, auth=auth)
print(req.json())
Example Response:
{"details":{"status":"ok"}}

HTTP Request

POST /domainorder/status

Query Parameters

Parameter Type Description
name string Domain name, ie. example.com

Services

Most of API methods found here will require service @id, you can lookup your service ids with /service method

List services

List all services under your account

curl "https://my.gigacloud.ua/api/service" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/service', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/service', auth=auth)
print(req.json())
Example Response:
{
    "services": [
        {
            "id": "33301",
            "domain": "example.com",
            "total": "10.0000",
            "status": "Active",
            "billingcycle": "Monthly",
            "next_due": "2015-10-22",
            "category": "Hosting",
            "category_url": "hosting",
            "name": "Starter Hosting"
        }
    ]
}

HTTP Request

GET /service

Service details

Return details for service @id

curl "https://my.gigacloud.ua/api/service/@id" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/service/@id', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/service/@id', auth=auth)
print(req.json())
Example Response:
{
    "service": {
        "id": "33337",
        "date_created": "2015-09-02",
        "domain": "example.com",
        "firstpayment": "10.00",
        "total": "10.00",
        "billingcycle": "Monthly",
        "next_due": "2015-10-22",
        "next_invoice": "2015-10-20",
        "status": "Active",
        "label": "",
        "username": "",
        "password": "",
        "rootpassword": "",
        "name": "Starter Hosting"
    }
}

HTTP Request

GET /service/@id

Query Parameters

Parameter Type Description
id int Service id

Upgrade Options

List upgrade options

curl "https://my.gigacloud.ua/api/service/@id/upgrade" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/service/@id/upgrade', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/service/@id/upgrade', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/upgrade

Query Parameters

Parameter Type Description
id int

Upgrade Request

Estimate or request upgrade

// Format of ''resources'' paremeter
{
    "resource_id" : "qty_value", // sliders & qty fields
    "resource_id" : "item_id", // dropdown & radio fields
    "resource_id" : {
        "item_id": "qty_value" // dropdown with qty field
    }
}
curl "https://my.gigacloud.ua/api/service/@id/upgrade" \
   -u user:pass \
   -d id="idValue"\
   -d resources[key]="resourcesValue"\
   -d package="packageValue"\
   -d cycle="cycleValue"\
   -d send="sendValue"
$data = array(
    'id' => 'idValue',
    'resources' => array('key'=>'value'),
    'package' => 'packageValue',
    'cycle' => 'cycleValue',
    'send' => 'sendValue'
);
$resp = Requests::post('https://my.gigacloud.ua/api/service/@id/upgrade', array(), $data, $options);

echo $resp->body;
payload = {
    'id' : 'idValue',
    'resources' : {'key':'value'},
    'package' : 'packageValue',
    'cycle' : 'cycleValue',
    'send' : 'sendValue'
}
req = requests.post('https://my.gigacloud.ua/api/service/@id/upgrade', params=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/upgrade

Query Parameters

Parameter Type Description
id int Service id
resources array array with resource values
package int New package id, optonal when upgrading resources
cycle string New billing cycle, optonal when upgrading resources
send boolean Set to true when you want to send your upgrade request

Services

IP Addresses

List Service IP Addresses

curl "https://my.gigacloud.ua/api/service/@id/ip" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/service/@id/ip', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/service/@id/ip', auth=auth)
print(req.json())
Example Response:
{
    "ips": [
        {
            "ipaddress": "15.20.101.2",
            "mask": "255.255.255.0",
            "client_description": "",
            "status": "assigned"
        }
    ]
}

HTTP Request

GET /service/@id/ip

Query Parameters

Parameter Type Description
id int Service ID

Reverse DNS

Get reverse DNS entries for service's IP addresses

curl "https://my.gigacloud.ua/api/service/@id/rdns" \
   -u user:pass 
$resp = Requests::get('https://my.gigacloud.ua/api/service/@id/rdns', array(), $options);

echo $resp->body;
req = requests.get('https://my.gigacloud.ua/api/service/@id/rdns', auth=auth)
print(req.json())
Example Response:
{
    "ips": [
        {
            "ipaddress": "10.10.101.2",
            "ptrname": "2.101.10.10.in-addr.arpa",
            "ptrcontent": "example.com"
        }
    ]
}

HTTP Request

GET /service/@id/rdns

Query Parameters

Parameter Type Description
id int Service ID

Update rDNS

Update reverse DNS entries service's IP addresses

curl "https://my.gigacloud.ua/api/service/@id/rdns" \
   -u user:pass \
   -d id="idValue"\
   -d ipaddress[key]="ipaddressValue"
$data = array(
    'id' => 'idValue',
    'ipaddress' => array('key'=>'value')
);
$resp = Requests::post('https://my.gigacloud.ua/api/service/@id/rdns', array(), $data, $options);

echo $resp->body;
payload = {
    'id' : 'idValue',
    'ipaddress' : {'key':'value'}
}
req = requests.post('https://my.gigacloud.ua/api/service/@id/rdns', params=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "revdnsupdated"
    ]
}

HTTP Request

POST /service/@id/rdns

Query Parameters

Parameter Type Description
id int Service ID
ipaddress array Use Ip address as parameter key and hostname as value