deploi.cloud

Deploi API Documentation

Introduction

Endpoint: https://api.deploi.no
All requests take JSON and return JSON.
Login using the Login command.

Index

AddDomainRecord
AddFirewallRule
CreateKubernetes
GetFirewallRules
GetDisks
GetFirewalls
Login
CreateVirtualServer
GetUserInfo
GetDomainInfo
GetBackupPlans
GetBackupInfo
GetDomainRecords
GetInvoices
GetServerInfo
GetKubernetesInfo
GetServers
Register
UpdateVirtualServer
GetEmailProducts
GetInvoiceInfo
CreateDatabase
GetDomainContacts
CreateFirewall
GetDomains
TransferDomain
GetEmailAccountInfo
DeleteDomainRecord
DuplicateWordpress
GetDatabases
GetKubernetes
DomainAvailable
UpdateDomainRecord
OrderDomain
Logout
GetAccountInfo
GetVirtualServerPrice
GetKubeConfig
GetDomainPrice
CreateWordpress
GetAlerts
UpdateAccountInfo
GetWordpress
GetVPNs

AddDomainRecord

Add domain record.

Request:

{
   "command":"AddDomainRecord",
   "token":"abc",
   "domain":"example.com",
   "type":"A",
   "host":"www",
   "value": "192.0.2.146",
   "options":{
     "ttl": 86400,
     "service": "",
     "protocol": "",
     "priority: 0,
     "weight: 0,
     "port: 0
   }
}


  • command: string, "AddDomainRecord"
  • token: string, required, must be a valid authentication token
  • type: string, can be "A", "AAAA", "TXT", "MX", "CNAME", "SOA" and "SRV"
  • host: string
  • value: string
  • options: structure
    • ttl: number, time to live in seconds
    • service: string
    • protocol: string, can be "tcp", "udp" or "tls"
    • priority: number, 0 - 65535
    • weight: number, 0 - 65535
    • port: number, 0 - 65535

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

AddFirewallRule

Add firewall rule.

Request:

{
   "command": "AddFirewallRule",
   "token": "abc",
   "id": 123,
   "src": "192.0.2.2",
   "src-port": 59375,
   "dst": "10.0.1.5",
   "dst-port": 22,
   "protocol": "tpc",
   "allow-src-cidr": "192.0.2.0/8"
}


  • command: string, "AddFirewallRule"
  • token: string, required, must be a valid authentication token
  • src: string, public IP to expose
  • src-port: number, port to expose on the public IP
  • dst: string, private IP to expose on the public IP
  • dst-port: number, port to expose on the public port
  • protocol: string, tcp or udp
  • allow-src-cidr: string, cidr of allowed addresses

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

CreateKubernetes

Create a Kubernetes account on Deploi's managed Kubernetes solution.

Request:

{
  "command": "CreateKubernetes",
  "token": "abc",
  "clientid": 10,
  "ram": 16,
  "cpu": 4,
  "disk": 10
}
  • command: "CreateServers"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • ram: number, GB of RAM available to Kubernetes services
  • cpu: number, CPU available to Kubernetes services
  • disk: number, GB of disk available to the services

Response:

{
  "success": true,
  "message": "Creating Kubernetes account.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetFirewallRules

Get firewall rules.

Request:

{
   "command": "GetFirewallRules",
   "token": "abc",
   "id": 123
}


  • command: string, "CreateFirewall"
  • token: string, required, must be a valid authentication token
  • id: number, firewall id

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetDisks

List disks.

Request:

{
  "command": "GetDisks",
  "token": "abc",
  "clientid": 123
}
  • command: "GetDisks"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that owns the disks

Response:

{
  "success": true,
  "message": "",
  "disks": [
    {
      "id": "hwe30nflge",
      "name": "Datadisk",
      "type": "SSD",
      "technology": "intern",
      "size": 42949672960
    }
  ]
}
  • success: boolean
  • message: string
  • disks: array of structures
    • id: string, ID of disk
    • name: string, name of disk
    • type: string, type of disk, either SSD or HDD.
    • technology: string, either "internal" or "network"
    • size: number, size of disk

CreateFirewall

Create firewall.

Request:

{
   "command": "CreateFirewall",
   "token": "abc",
   "clientid": 123,
   "name": "My Firewall",
   "tb": 1,
   "ipv4s": 2
}


  • command: string, "CreateFirewall"
  • token: string, required, must be a valid authentication token
  • clientid: number, client id
  • name: string, name of firewall
  • tb: number, tera bytes of transfer per month
  • ipv4s: number, number of public IPv4 addresses to assign to the firewall

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

Login

Login to account

Request:

{
  "command": "Login",
  "username": "username",
  "password": "password",
  "secondfactor": "413903"
}
  • command: "Login"
  • username: string, required. The e-mail of the user.
  • password: string, required
  • secondfactor: string, optional. Two factor code for two factor authentication.

Response:

{
  "success": true,
  "message": "Login successfull.",
  "data": {
    "token": "abc",
    "clients": [
      {
         "id": 123,
         "name": "Company A"
      },
      {
         "id": 321,
         "name": "Company B"
      }
    ]
  }
}
  • success: boolean
  • message: string
  • data: structure, optional
    • token: string, login token to be passed with subsequent requests
    • clients: array of numbers, the clients the user has access to

CreateVirtualServer

Create virtual server.

Request:

{
  "command": "CreateVirtualServer",
  "token": "abc",
  "clientid": 10,
  "name": "My server",
  "ram": 16,
  "cpu": 4,
  "disks": [
    {
      "idSet": false,
      "id": "",
      "name": "mydisk1",
      "size": 40,
      "type": "ssd",
      "backupSpecs": {
        "profileIdSet": false,
        "profileId": 0,
        "spec": [
          {
            "loc": 1,
            "daily": 10,
            "weekly": 0,
            "monthly": 0,
            "yearly": 0
          }
        ]
      }
    }
  ],
  "OS": "Ubuntu 22.04",
  "licenses": [],
  "password": "Pn37NaQbN6bfAg7",
  "publickey": "",
  "allowRemotePasswordLogin": true
}
  • command: "CreateVirtualServer"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • name: string, name of server
  • ram: number, GB of RAM
  • cpu: number, CPU
  • disks: structure
    • name: string, name of disk
    • size: number, size in GB
    • type: string, can be "ssd", "hdd"
    • backupSpecs, structure
      • daily: number, how many daily backups to keep
      • weekly: number, how many weekly backups to keep
      • monthly: number, how many monthly backups to keep
      • yearly: number, how many yearly backups to keep
      • locations: structure
        • 1: boolean, store backups at location 1
        • 2: boolean, store backups at location 2
  • OS: string, name of OS to install options are: "Ubuntu 22.04", "Ubuntu 20.04", "Windows Server 2016", "Windows Server 2019", "Fedora 34", "Suse 15.1", "Debian 10", "Debian 11", "CentOS 8.2", "AlmaLinux 9.0"
  • licenses: array of strings. Licenses for software. Options are "Windows".
  • password: string, the login password.
  • publickey: string, the login pubic key.
  • allowRemotePasswordLogin: boolean. Allow remote password login. Not recommended.

Response:

{
  "success": true,
  "message": "Server ordered.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetUserInfo

Get user information.

Request:

{
  "command": "GetUserInfo",
  "token": "abc"
}
  • command: "GetUserInfo"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "userInfo": {
      "id": 432,
      "firstname": "Bob",
      "lastname": "Jensen",
      "email": "bob@company.com",
      "twoFactorAuthentication": false,
      "accounts": [
         123,
         321
      ]
  }
}
  • success: boolean
  • message: string
  • accountinfo:
    • loggedin: boolean, whether or not user is logged in.
    • firstname: string
    • lastname: string
    • email: string
    • phone: string
    • type: string, either "company" or "person"
    • companyname: string
    • companyid: string
    • addressline1: string
    • addressline1: string
    • city: string
    • postalcode: string
    • countrycode: string, two letter contry code, ISO 3166-1 alpha-2
    • agreedtotac: boolean
    • receiveinfo: boolean
    • ehfinvoice: boolean
    • autocreate: boolean, whether the client can automatically provision services

GetDomainInfo

Get domain information.

Request:

{
  "command": "GetDomains",
  "token": "abc",
  "domain": "example.com"
}
  • command: "GetDomains"
  • token: string, required, must be a valid authentication token
  • domain: string, the domain name

Response:

{
  "success": true,
  "message": "",
  "domainInfo": [
    {
      "idOwner": "x1", 
      "idAdmin": "x2", 
      "idTech": "x3", 
      "idBilling": "x4"
    }
  ]
}
  • success: boolean, whether the request was successfull or not.
  • message: string, if unsuccessfull, the reason why
  • id: number. The deploi domain id.
  • name: string. The domain name.
  • registrationDate: date. Fetched from registrar.
  • expiryDate: date. Fetched from registrar.
  • nextDueDate: date. Fetched from deploi.

GetBackupPlans

List backup plans.

Request:

{
  "command": "GetBackupPlans",
  "token": "abc",
  "clientid": 123
}
  • command: "GetBackupPlans"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that owns the backup plans

Response:

{
  "success": true,
  "message": "",
  "backupPlans": [
    {
      "id": "197-1-1",
      "backupof": "VPS",
      "objectid": "123",
      "objectname": "My VPS",
      "location": "1",
      "daily": 0,
      "weekly": 1,
      "monthly": 0,
      "yearly": 0
    }
  ]
}
  • success: boolean
  • message: string
  • backupPlans: array of structures.
    • id: string, ID of backupplan.
    • backupof: string, what is backed up.
    • objectid: string, id of what is being backed up.
    • objectname: string, name of what is backuped up.
    • location: Name of location where backup is stored.
    • daily: number, how many daily backups are kept
    • weekly: number, how many weekly backups are kept
    • monthly: number, how many monthly backups are kept
    • yearly: number, how many yearly backups are kept

GetBackupInfo

Get information and details on a backup plan.

Request:

{
  "command": "GetBackupInfo",
  "token": "abc",
  "planid": "123"
}
  • command: "GetBackupInfo"
  • token: string, required, must be a valid authentication token
  • planid: string, requires, the ID of the plan

Response:

{
  "success": true,
  "message": "",
  "backupInfo": {
    "slots": [
       {
          "type": "interval",
          "interval":{
              "from": "2023-01-02",
              "to": "2023-01-08"
          },
          "name": "2023-01-02",
          "present": true
       }
    ]
  }
}
  • success: boolean
  • message: string
  • backupInfo: structure
    • slots, array of structures
      • type, string: can be interval and permanent
      • interval, structure
        • from
        • to
      • name
      • present

GetDomainRecords

Get the records of a domain.

Request:

{
  "command": "GetDomainRecords",
  "token": "abc",
  "domain": "example.com"
}
  • command: string, "GetDomainRecords"
  • token: string, required, must be a valid authentication token
  • domain: string, domain name

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  "records": [
    {
      "type": "A",
      "host": "www.progsbase.com",
      "value": "192.0.2.146",
      "options": {
        "ttl": 86400,
        "serviceSet": false,
        "service": "",
        "protocolSet": false,
        "protocol": "",
        "priority: 0,
        "weight: 0,
        "port: 0
      }
    },
    {
      "type": "AAAA",
      "host": "www.progsbase.com",
      "value": "2001:db8::8a2e:370:7334",
      "options": {
        "ttl": 86400,
        "serviceSet": false,
        "service": "",
        "protocolSet": false,
        "protocol": "",
        "priority": 0,
        "weight": 0,
        "port": 0
      }
    }
  ]
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages
  • records: arrays of structure
    • type: string, can be "A", "AAAA", "TXT", "MX", "NS", "CNAME", "SOA", "PTR", "SRV", "DCHID" and "DNAME"
    • host: string
    • value: string
    • options: structure
      • ttl: number, time to live in seconds
      • service: string
      • protocol: string, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535

GetInvoices

Get invoices.

Request:

{
  "command": "GetInvoices",
  "token": "abc",
  "clientid": 123
}
  • command: "GetAlerts"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "invoices": [
     {
       "id": 4714,
       "date": "2022-12-18",
       "due": "2023-01-01",
       "amount": "960",
       "cancelled": false
       "paid": true
     }
   ]
}
  • success: boolean
  • message: string
  • invoices:
    • id: number
    • date: string
    • due: string
    • amount: string, the amount as a string
    • cancelled: boolean, whether the invoice has been cancelled.
    • paid: boolean, whether the invoice has been paid.

GetServerInfo

List servers.

Request:

{
  "command": "GetServerInfo",
  "token": "abc",
  "id": 123
}
  • command: "GetServerInfo"
  • token: string, required, must be a valid authentication token
  • id: number, ID of the server. Must be accessible from the logged in account.

Response:

{
  "success": true,
  "message": "",
  "servers": {
    "id": 2,
    "name": "ExampleWebServer",
    "type": "virtual",
    "virtual": {
      "mainip": "192.0.2.55",
      "ram": 2,
      "cpu": 1,
      "disks": [
        {
          "id": "125",
          "type": "ssd",
          "size": 20
        },
        {
          "id": "126",
          "type": "hdd",
          "size": 1000
        }
      ],
      "suspended": false,
      "running": true,
      "ips": [
        "192.0.2.55",
        "2001:8d1:7204:1:0000:0000:01a2:3ecc",
        "10.5.0.112"
      ]
    },
    "licenses": []
  }
}
  • success: boolean
  • message: string
  • serverInfo: structure
    • id: number
    • name: navn på server hos deploi
    • type: type server: virtual or dedicated
    • virtual: structure
    • dedicated: structure
    • licenses: array of structures, licenses associated with the server

GetKubernetesInfo

Get information about a Kubernetes account.

Request:

{
  "command": "GetKubernetesInfo",
  "token": "abc",
  "id": 123
}
  • command: "GetKubernetesInfo"
  • token: string, required, must be a valid authentication token
  • id: number, ID of the server. Must be accessible by the logged in account.

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  "kubernetesInfo": {
   "resources": {
      "cpuAvailable": 4000,
      "cpuUsed": 0,
      "diskAvailable": 21474836480,
      "diskUsed": 0,
      "ramAvailable": 8589934592,
      "ramUsed": 0
    }
  }
}
  • success: boolean
  • message: string
  • messageId: number
  • kubernetesInfo: structure
    • resources: structure
      • cpuAvailable: number, the number of milli CPU available (1000m = 1 vCPU)
      • cpuUsed: number, the number of milli CPUs in use.
      • diskAvailable: number, the number of bytes available
      • diskUsed: number, the number of bytes allocated for storage
      • ramAvailable: number, the number of bytes of memory available for services.
      • ramUsed: number, the number of bytes of ram currently allocated for services.

GetServers

List servers.

Request:

{
  "command": "GetServers",
  "token": "abc",
  "clientid": 123
}
  • command: "GetServers"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "servers": [
    {
      "id": 2,
      "name": "testvps",
      "type": "virtual",
      "ram": 2,
      "cpu": 1,
      "disk": 10,
      "status": "active"
    }
  ]
}
  • success: boolean
  • message: string
  • servers: array
    • id: number
    • name: string, name of server at Deploi
    • type: type server: virtual or dedicated
    • ram: GB RAM
    • cpu: processor power
    • disk: GB Disk
    • status: status, options are: "creating", "active" and "off"

Register

Register a new account.

Request:

{
  "command": "Register",
  "firstname": "",
  "lastname": "",
  "email": "",
  "phone": "",
  "password": "",
  "type": "company",
  "companyname": "",
  "taxid": "",
  "line1": "",
  "line2": "",
  "city": "",
  "state": "",
  "postalcode": "",
  "country": "NO",
  "agreedtotac": true,
  "receiveinfo": false,
  "ehfinvoice": false
}
  • command: "Register"
  • firstname: string, required
  • lastname: string, required
  • email: string, required, must be valid email
  • phone: string, required, must be valid phone number
  • password: string, required
  • type: string, required, must either "company" or "person"
  • companyname: string, required if type is "company", name of legal entity
  • taxid: string, required if type is "company", must be valid company number
  • line1: string, required, must be valid company address
  • line2: string
  • city: string, required
  • state: string
  • postalcode: string, required
  • country: two characters country code, required, must be valid country code
  • agreedtotac: boolean, required, must be true
  • receiveinfo: boolean, required
  • ehfinvoice: boolean, required

Response:

{
  "success": true,
  "message": "Registration successful.",
  "messageId": 1
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

UpdateVirtualServer

Update virtual server.

Request:

{
  "command": "UpdateVirtualServer",
  "token": "abc",
  "id": 123,
  "setCpu": true,
  "cpucent": 400,
  "setRam": false,
  "ram": 0,
  "diskChange": [
    {
        "id": "323",
        "size": 33
    }
  ]
}
  • command: "UpdateVirtualServer"
  • token: string, required, must be a valid authentication token
  • id: number, id of virtual server product
  • setCpu: boolean, whether to update the amount of CPU
  • cpucent: number, new CPU amount
  • setRam: boolean, whether to update the amount of RAM
  • ram: number, new amount of RAM in GB
  • diskChange: array of structures
    • id: string, id of disk
    • size: number, the new size of the disk in GB

Response:

{
  "success": true,
  "message": "Server ordered.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetAccountInfo

Get account information.

Request:

{
  "command": "GetEmailProducts",
  "token": "abc",
  "clientid": 123
}
  • command: "GetAccountInfo"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "emailProducts": [
    {
      "id": 517,
      "email": "test@deploi.com",
      "type": "account"
    }
  ]
}
  • success: boolean
  • message: string
  • emailProducts: array of structures
    • id: number
    • email: string, the email address
    • type: string, account or transactional
    • used: number, the used GB of storage
    • total: number, the available GB of storage

GetInvoiceInfo

Get invoice information

Request:

{
  "command": "GetInvoiceInfo",
  "token": "abc",
  "invoiceNr": 432
}
  • command: "GetInvoiceInfo"
  • token: string, required, must be a valid authentication token
  • invoiceid: number, requires, the invoice number

Response:

{
  "success": true,
  "message": "",
  "invoiceInfo": {
    "date": "2022-12-18",
    "due": "2023-01-01",
    "amount": "960",
    "cancelled": false
    "paid": true,
    "lines": [
        {
            "description": "Server",
            "amount": "960"
        }
    ]
  }
}
  • success: boolean
  • message: string
  • invoiceInfo: structure
    • date: string
    • due: string
    • amount: string, the amount as a string
    • cancelled: boolean, whether the invoice has been cancelled.
    • paid: boolean, whether the invoice has been paid.

CreateDatabase

Create a database on Deploi's managed database solution.

Request:

{
  "command": "CreateDatabase",
  "token": "abc",
  "clientid": 10,
  "type": "MySQL",
  "ram": 16,
  "cpu": 4,
  "disk": 10
}
  • command: "CreateServers"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • type: string, can be "MySQL" or "PostgreSQL"
  • ram: number, GB of RAM available to Kubernetes services
  • cpu: number, CPU available to Kubernetes services
  • disk: number, GB of disk available to the services

Response:

{
  "success": true,
  "message": "Creating Database.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetDomainContacts

Get the price of registering the domain.

Request:

{
  "command": "GetDomainContacts",
  "token": "abc",
  "domain": "example.com"
}
  • command: string, "GetDomainContacts"
  • token: string, required, must be a valid authentication token
  • domain: string, domain name

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  "contacts": {
    "holder": {
      "id": "n-jm6374",
      "firstName": "Marc",
      "lastName": "Bobson",
      "company": true,
      "companyName": "Company ASA",
      "companyID": "NO 294849297 MVA",
      "contry": "NO",
      "addressLine1": "Main road 1",
      "addressLine2": "Flr. 2",
      "postalCode": "9387",
      "city": "Oslo",
      "phone": "(+47) 39384023",
      "email": "bobtest@test.com"
    },
    "administrativeContact": {
      "id": "n-jm6375",
      "firstName": "Bob",
      "lastName": "Marcson",
      "company": false,
      "companyName": "",
      "companyID": "",
      "contry": "NO",
      "addressLine1": "Main road 2",
      "addressLine2": "Flr. 1",
      "postalCode": "9387",
      "city": "Oslo",
      "phone": "(+47) 57395475",
      "email": "bobtest@test.com"
    },
    "technicalContact": {
      "id": "n-jm6375",
      "firstName": "Bob",
      "lastName": "Marcson",
      "company": false,
      "companyName": "",
      "companyID": "",
      "contry": "NO",
      "addressLine1": "Main road 2",
      "addressLine2": "Flr. 1",
      "postalCode": "9387",
      "city": "Oslo",
      "phone": "(+47) 57395475",
      "email": "bobtest@test.com"
    },
    "billingContact": {
      "id": "n-jm6375",
      "firstName": "Bob",
      "lastName": "Marcson",
      "company": false,
      "companyName": "",
      "companyID": "",
      "contry": "NO",
      "addressLine1": "Main road 2",
      "addressLine2": "Flr. 1",
      "postalCode": "9387",
      "city": "Oslo",
      "phone": "(+47) 57395475",
      "email": "bobtest@test.com"
    }
  }
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages
  • contacts: structure
    • holder: structure Domain Contact
    • administrativeContact: structure Domain Contact
    • technicalContact: structure Domain Contact
    • billingContact: structure Domain Contact

structure Domain Contact:

  • id: string
  • firstName: string
  • lastName: string
  • company: boolean, is company or person
  • companyName: string
  • companyID: string
  • contry: string
  • addressLine1: string
  • addressLine2: string
  • postalCode: string
  • city: string
  • phone: string
  • email: string

CreateFirewall

Create firewall.

Request:

{
   "command": "CreateFirewall",
   "token": "abc",
   "clientid": 123,
   "name": "My Firewall",
   "tb": 1,
   "ipv4s": 2
}


  • command: string, "CreateFirewall"
  • token: string, required, must be a valid authentication token
  • clientid: number, client id
  • name: string, name of firewall
  • tb: number, tera bytes of transfer per month
  • ipv4s: number, number of public IPv4 addresses to assign to the firewall

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetDomains

Get domain list for account.

Request:

{
  "command": "GetDomains",
  "token": "abc",
  "clientid": 123
}
  • command: "GetDomains"
  • token: string, required, must be a valid authentication token
  • clientid

Response:

{
  "success": true,
  "message": "",
  "domains": [
    {
      "name": "inductive.no", 
      "registrationDate": "2015-06-01", 
      "expiryDate": "2023-06-01", 
      "nextDueDate": "2023-05-01"
    }
  ]
}
  • success: boolean, whether the request was successfull or not.
  • message: string, if unsuccessfull, the reason why
  • id: number. The deploi domain id.
  • name: string. The domain name.
  • registrationDate: date. Fetched from registrar.
  • expiryDate: date. Fetched from registrar.
  • nextDueDate: date. Fetched from deploi.

TransferDomain

Transfer a domain to Deploi.

Request:

{
  "command": "TransferDomain",
  "token": "abc",
  "clientid": 10,
  "domain": "example.com",
  "authcode": "amfi3mfp"
}
  • command: "TransferDomain"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • domain: string, domain name
  • authcode: string, an authorization code for the domain name

Response:

{
  "success": true,
  "message": "Domain transfer in progress.",
  "messageId": 93
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetEmailAccountInfo

Get e-mail account information.

Request:

{
  "command": "GetEmailAccountInfo",
  "token": "abc",
  "email": "test@example.com"
}
  • command: "GetEmailAccountInfo"
  • token: string, required, must be a valid authentication token
  • email: string, required, an email address

Response:

{
  "success": true,
  "message": "",
  "used": 0.2,
  "total": 10
}
  • success: boolean
  • message: string
  • used: number, the used GB of storage
  • total: number, the available GB of storage

DeleteDomainRecord

Delete a domain record.

Request:

{
   "command":"DeleteDomainRecord",
   "token":"abc",
   "domain":"example.com",
   "type":"A",
   "host":"www",
   "value": "192.0.2.146"
}


  • command: string, "DeleteDomainRecord"
  • token: string, required, must be a valid authentication token
  • type: string, can be "A", "AAAA", "TXT", "MX", "CNAME", "SOA" and "SRV"
  • host: string
  • value: string

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

DuplicateWordpress

Create a database on Deploi's managed database solution.

Request:

{
  "command": "DuplicateWordpress",
  "token": "abc",
  "type": "forge",
  "id": 123,
  "newDomain": "new.example.com"
}
  • command: "DuplicateWordpress"
  • token: string, required, must be a valid authentication token
  • type: "forge"
  • id: number, the ID of the WordPress-installation
  • newDomain: string, the domain of the duplicated Wordpress site

Response:

{
  "success": true,
  "message": "Creating Database.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetDatabases

Get managed Kubernetes accounts.

Request:

{
  "command": "GetDatabases",
  "token": "abc",
  "clientid": 123
}
  • command: "GetDatabases"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "databases": [
   {
     "id": 106,
     "type": "MySQL",
     "ram": 1,
     "cpu": 0.25,
     "disk": 10,
     "status": {
       "status": "active",
       "diskUsed": 0.3,
       "ips": ["192.0.2.14", "10.0.0.69", "2001:db8:7204:1::a11a:5741"],
       "post": 3427
     }
   },
   {
     "id": 117,
     "type": "PostgreSQL",
     "ram": 1,
     "cpu": 0.25,
     "disk": 9.9,
     "status": {
       "status": "active",
       "diskUsed": 0.1,
       "ips": ["192.0.2.14"],
       "post": 5528
     }
   }
  ]
}
  • success: boolean
  • message: string
  • databases: array of structures
    • id: number
    • type: Type of database, for example MySQL or PostgreSQL
    • ram: number, RAM quota in GB
    • cpu: number, CPU quota
    • disk: number, Disk quota.
    • status: structure
      • status: string, for example "active" or "inactive"
      • diskUsed: number, current disk usage
      • ips: array of strings, the IP the database is listening on
      • port: number, the port the database is listening on

GetKubernetes

Get managed Kubernetes accounts.

Request:

{
  "command": "GetKubernetes",
  "token": "abc",
  "clientid": 123
}
  • command: "GetKubernetes"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "kubernetes": [
   {
     "id": 565,
     "ram": 8,
     "cpu": 4,
     "disk": 20
   }
  ]
}
  • success: boolean
  • message: string
  • kubernetes:
    • id: number
    • ram: RAM quota for all systems
    • cpu: CPU quota for all systems
    • disk: disk quota for all storage

DomainAvailable

Check if a domain is available.

Request:

{
  "command": "DomainAvailable",
  "domain": "example.com"
}
  • command: string, "DomainAvailable"
  • domain: string, domain name

Response:

{
  "success": true,
  "message": "success",
  "messageId": 10,
  "available": false
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages
  • available: boolean, whether the domain is available

UpdateDomainRecord

Update a domain record.

Request:

{
  "command": "UpdateDomainRecord",
  "token": "abc",
  "domain": "example.com",
  "type": "A",
  "from": {
    "host":"www",
    "value": "192.0.2.146",
    "options": {
      "ttl": 86400
    }
  },
  "to": {
    "host":"www2",
    "value": "192.0.2.147",
    "options": {
      "ttl": 86400
    }
  }
}


  • command: string, "AddDomainRecord"
  • token: string, required, must be a valid authentication token
  • type: string, can be "A", "AAAA", "TXT", "MX", "CNAME", "SOA" and "SRV"
  • from: structure
    • host
    • value
    • options: structure
      • ttl: number, time to live in seconds
      • service: string
      • protocol: string, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535
  • to: structure
    • host
    • value
    • options: structure
      • ttl: number, time to live in seconds
      • service: string
      • protocol: string, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

OrderDomain

Order a new domain.

Request:

{
  "command": "OrderDomain",
  "token": "abc",
  "clientid": 10,
  "domain": "example.com",
  "operation": "register",
  "authcode": ""
  "keepowner": false
}
  • command: "OrderDomain"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • domain: string, domain name
  • operation: string, can be "register" or "transfer"
  • authcode: string, the authorization code for a domain transfer
  • keepowner: boolean, in case of a transfer, the owner will not change

Response:

{
  "success": true,
  "message": "Domain order in progress.",
  "messageId": 86
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

Logout

Log out of an account.

Request:

{
  "command": "Logout",
  "token": "abc"
}
  • command: "Login"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "Logout successful."
}
  • success: boolean
  • message: string

GetAccountInfo

Get account information.

Request:

{
  "command": "GetAccountInfo",
  "token": "abc",
  "clientid": 123
}
  • command: "GetAccountInfo"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "accountInfo": {
      "id": 123,
      "firstname": "Bob",
      "lastname": "Jensen",
      "email": "bob@company.com",
      "phone": "1393927405",
      "type": "company",
      "companyname": "Company Ltd",
      "legalentityid": "53942340929",
      "addressline1": "Majorstreet 1",
      "addressline1": "",
      "city": "New Sidney",
      "postalcode": "23902",
      "countrycode": "US",
      "agreedtotac": true,
      "receiveinfo": true,
      "ehfinvoice": false,
      "autocreate": true
  }
}
  • success: boolean
  • message: string
  • accountinfo:
    • loggedin: boolean, whether or not user is logged in.
    • firstname: string
    • lastname: string
    • email: string
    • phone: string
    • type: string, either "company" or "person"
    • companyname: string
    • legalentityid: string
    • addressline1: string
    • addressline1: string
    • city: string
    • postalcode: string
    • countrycode: string, two letter contry code, ISO 3166-1 alpha-2
    • agreedtotac: boolean
    • receiveinfo: boolean
    • ehfinvoice: boolean
    • autocreate: boolean, whether the client can automatically provision services

GetVirtualServerPrice

Get the price of a virtual server.

Request:

{
  "command": "GetVirtualServerPrice",
  "product" "server",
  "server": {
    "ram": 4,
    "cpu": 1,
    "disk": 10,
  }
}
  • command: "CreateServers"
  • product: string, required, product name
  • server: structure, specification of server
    • ram: number, GB of RAM
    • cpu: number, CPU percentage
    • disk: number, GB of disk

Response:

{
  "success": true,
  "message": "",
  "price": 112
}
  • success: boolean
  • message: string
  • price: number

GetKubeConfig

Get Kubernetes config file for managed Kubernetes account.

Request:

{
  "command": "GetKubeConfig",
  "token": "abc",
  "id": 123
}
  • command: "GetKubeConfig"
  • token: string, required, must be a valid authentication token
  • id: number, ID of the server. Must be accessible by the logged in account.

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  "kubeconfig": "..."
}
  • success: boolean
  • message: string
  • messageId: number
  • kubeconfig: string, the kube config file contents

GetDomainPrice

Get the price of registering the domain.

Request:

{
  "command": "GetDomainPrice",
  "domain": "example.com"
}
  • command: string, "GetDomainPrice"
  • domain: string, domain name

Response:

{
  "success": true,
  "message": "Price found.",
  "messageId": 10,
  "priceRegistration": "95",
  "priceTransfer": "95",
  "priceRenewal": "95"
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages
  • priceRegistration: string, the registration price in NOK
  • priceTransfer: string, the transfer price in NOK
  • priceRenewal: string, the renewal price in NOK

CreateWordpress

Create a WordPress website on Deploi's managed WordPress solution.

Request:

{
  "command": "CreateWordpress",
  "token": "abc",
  "clientid": 10,
  "domain": "deploi.cloud",
  "ram": 16,
  "cpu": 4,
  "disk": 10
}
  • command: "CreateWordpress"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the server
  • domain: string, the domain to be used for the WordPress website
  • ram: number, GB of RAM available to Kubernetes services
  • cpu: number, CPU available to Kubernetes services
  • disk: number, GB of disk available to the services

Response:

{
  "success": true,
  "message": "Creating Wordpress website.",
  "messageId": 10
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetAlerts

Get alerts.

Request:

{
  "command": "GetAlerts",
  "token": "abc",
  "clientid": 123
}
  • command: "GetAlerts"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "alerts": [
    {
      "id": 834,
      "description": "Backup of server 123 has been performed.",
      "checkFrequency": {
        "day": 1,
        "week": 0,
        "month": 0,
        "year": 0
      },
      "checkTime": "01:00"
    }
  ]
}
  • success: boolean
  • message: string
  • alerts:
    • id: number
    • description: string, description of the alert
    • checkFrequency: structure, how often the alert is checked
      • day: number
      • week: number
      • month: number
      • year: number
    • checkTime: time, the time of day when the check is performed

UpdateAccountInfo

Update account information for an account.

Request:

{
  "command": "UpdateAccountInfo",
  "token": "abc",
  "clientid": 123,
  "settype": false,
  "type": "",
  "setcompanyname": false,
  "companyname": "",
  "setlegalentityid": false,
  "legalentityid": "",
  "setfirstname": false,
  "firstname": "",
  "setlastname": false,
  "lastname": "",
  "setemail": false,
  "email": "",
  "setphone": false,
  "phone": "",
  "setaddressline1": false,
  "addressline1": "",
  "setaddressline2": false,
  "addressline2": "",
  "setpostalcode": false,
  "postalcode": "",
  "setcity": false,
  "city": "",
  "setstate": false,
  "state": "",
  "setcountrycode": false,
  "countrycode": "",
  "setEhfInvoice": false,
  "ehfinvoice": false,
  "setagreedtotac": false,
  "agreedtotac": false,
  "setreceiveinfo": false,
  "receiveinfo": false
}


  • command: string, "UpdateAccountInfo"
  • token: string, required, must be a valid authentication token
  • clientid: number, account id
  • settype: boolean
  • type: string, "company" or "persib"
  • setcompanyname: boolean
  • companyname: string, see register
  • setlegalentityid: boolean
  • legalentityid: string, see register
  • setfirstname: boolean
  • firstname: string, see register
  • setlastname: boolean
  • lastname: string, see register
  • setemail: boolean
  • email: string, see register
  • setphone: boolean
  • phone: string, see register
  • setaddressline1: boolean
  • addressline1: string, see register
  • setaddressline2: boolean
  • addressline2: string, see register
  • setpostalcode: boolean
  • postalcode: string, see register
  • setcity: boolean
  • city: string, see register
  • setstate: boolean
  • state: string, see register
  • setcountrycode: boolean
  • countrycode: string, see register
  • setEhfInvoice: boolean
  • ehfinvoice: boolean, see register
  • setagreedtotac: boolean
  • agreedtotac: boolean, see register
  • setreceiveinfo: boolean
  • receiveinfo: boolean, see register

Response:

{
  "success": true,
  "message": "Nothing to change in request.",
  "messageId": 64
}
  • success: boolean
  • message: string
  • messageId: number, id used to lookup localized messages

GetWordpress

Get managed WordPress websites.

Request:

{
  "command": "GetWordpress",
  "token": "abc",
  "clientid": 123
}
  • command: "GetWordpress"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "wordpresses": [
   {
     "type": "deploihosted",
     "id": 569,
     "domain": "example.cloud",
     "deploihosted": {
       "ram": 8,
       "cpu": 400,
       "disk": 20,
     },
     "forge": {
       "siteId": 0,
       "serverId": 0 
     }
   }
  ]
}
  • success: boolean
  • message: string
  • wordpresses:
    • type: string, can be "deploihosted" or "forge"
    • id: number
    • ram: RAM quota for website
    • cpu: CPU-cent quota for website
    • disk: disk quota for website

GetVPNs

Get VPN accounts.

Request:

{
  "command": "GetVPNs",
  "token": "abc",
  "clientid": 123
}
  • command: "GetVPNs"
  • token: string, required, must be a valid authentication token

Response:

{
  "success": true,
  "message": "",
  "vpns": [
   {
     "id": 565,
     "username": "username1",
     "ip": "192.0.2.14"
   }
  ]
}
  • success: boolean
  • message: string
  • vpns:
    • id: number
    • username: string
    • ip: string