deploi.cloud

Deploi API Documentation

Introduction

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

Index

DeleteFirewallCertificate
RemoveSSHKey
UpdateWAF
MonitorDisk
WordpressCheckSetup
GetDomainPrice
GetFirewallPublicIPs
RestartApache
OrderDomain
DeleteSiteDatabase
GetInvoices
ForgotPassword
Ping
GetFirewallReverseProxies
AddFirewallPrivateNetwork
EnableWAF
GetBackupInfo
CreateCertificate
ChangeNameServers
DisableWAF
UpdateSiteDomains
GetEmailAccountInfo
InstallWordpress
GetFirewalls
RestartVirtualServer
GetDomainContacts
GetAccountInfo
GetDatabases
UpdateDomainContact
UpdateReverseProxy
DeleteDomainRecord
Login
GetEmailProducts
UpdateDomainRecord
CreateFirewallCertificate
GetKubernetesInfo
DuplicateWordpress
GetServerInfo
MonitorCPU
CreateDatabaseUser
UpdateVirtualServer
GetAlerts
DisableGeoBlock
AddFirewallRule
GetSiteBackups
GetWordpress
CreateReverseProxy
GetDomains
GetBackupPlans
BackupSite
GetDisks
GetDomainNameServers
AddFirewallPrivateNetworkConnector
CreateSiteDatabase
DeleteCertificate
GetUserInfo
EnableGeoBlock
UpdateAccountInfo
GetFirewallPrivateNetworks
GetReverseProxyInfo
GetServers
GetSite
RestoreSiteFromBackup
DeleteFirewallRule
GetLogStatistics
GetSiteDatabases
GetDomainAuthCode
DeleteFirewallPrivateNetworkConnector
MonitorRAM
GetInvoiceInfo
DeleteFirewallPrivateNetwork
GetKubeConfig
DomainAvailable
GetSSHKeys
GetSites
AddSSHKey
GetDomainRecords
OrderEmailService
CreateFirewall
GetVPNs
Logout
DuplicateSite
Register
GetWordpressInfo
SetEmailPassword
CancelAgreement
GetDatabaseUser
GetKubernetes
CreateVirtualServer
GetFirewallRules
UpdateGeoBlock
AddDomainRecord
DeleteDatabaseUser

DeleteFirewallCertificate

Deletes a certificate for the domains.

Request:

{
  "command": "DeleteFirewallCertificate",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "DeleteFirewallCertificate"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "Certificate deleted.",
  "messageId": 87
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

RemoveSSHKey

Remove a ssh-key for a user

Request:

{
   "command": "RemoveSSHKey",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "keyname": "testkey",
   "key": "key",
   "name": "testuser"
}


  • command: string, RemoveSSHKey
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID
  • keyname: string, name for the ssh-key
  • key: string, an ssh-key
  • name: string, name of the user you delete a ssh-key for

Response:

{
  "success": true,
  "message": "Removed ssh-key for user.",
  "messageId": 114
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

UpdateReverseProxy

Update reverse proxy information

Request:

{
  "command": "UpdateReverseProxy",
  "id": 1,
  "reverseProxyId": 1,
  "setLogParanoiaLevel": true,
  "logParanoiaLevel": 1,
  "setBlockingParanoiaLevel": true,
  "blockingParanoiaLevel":1,
   "wafMode":"On"
}

  • command: string, "UpdateReverseProxy"
  • token: string, required, must be a valid authentication token
  • reverseProxyId: number, required, the id of the reverseproxy site
  • id: number, required, the id of the product
  • setBlockingParanoiaLevel: boolean, required, sets if blocking paranoia level should be changed
  • setLogParanoiaLevel boolean, required, sets if log paranoia level should be changed
  • logParanoiaLevel: number, required, the level of firewall rules to be logged
  • blockingParanoiaLevel: number, required, the level of firewall rules to be executed
  • wafMode: string, required, the mode the waf operates in

Response:

{
  "success": true,
  "message": "WAF updated.",
  "messageId": 88
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

MonitorDisk

Gets disk usage information

Request

{
  "command": "MonitorDisk",
  "token": abc123,
  "id": 748
}
  • command: "MonitorDisk"
  • token: string, required, must be a valid authentication token

Response

{
  "success": true,
  "data":
  {
    "available":"14694223872",
    "total":"19682557952",
    "used":"26%"
  }
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • available: string, total amount of disk
  • 1K-blocks: string, average cpu use the last 15 minutes
  • used%: string, percentage of disk used

WordpressCheckSetup

Check that the WordPress was set up correctly.

Request:

{
   "command": "WordpressCheckSetup",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123
}
  • command: string, "WordpressCheckSetup"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the WordPress service

Response:

{
  "success": true,
  "message": "Domain IPs checked",
  "messageId": -1,
  
  "ips": {
    "success": true,
    "exists": true,
    "message": ""
  },
  "installed": {
    "success": true,
    "exists": true,
    "message": ""
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, id used to lookup localized messages
  • ips: structure
    • success: boolean, succeeded checking IP status
    • exists: boolean, the IPs are set correctly
    • message: string, why the IP check failed
  • installed: structure
    • success: boolean, succeeded checking that WordPress was installed
    • exists: boolean, WordPress was installed correctly
    • message: string, why the installation check failed

GetDomainPrice

Get the price of a domain. Includes prices for registration, transfer and renewal.

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, if success is false, a description of the problem that occurred
  • 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

GetFirewallPublicIPs

Get the public IPs of the firewall.

Request:

{
   "command": "GetFirewallPublicIPs",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123
}
  • command: string, "GetFirewallPublicIPs"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,

  "publicIPv4s": [
    "191.64.51.72"
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • publicIPv4s: array of string, the firewall's public IPv4s

RestartApache

Restarts apache.

Request:

{
   "command": "RestartApache",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1
}


  • command: string, RestartApache
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to create a certificate for

Response:

{
  "success": true,
  "message": "Apache restarted.",
  "messageId": 109
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

OrderDomain

Order a new domain.

Request:

{
  "command": "OrderDomain",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 15,
  "domain": "example.com",
  "operation": "register",
  "prepare": false,
  "authcode": "",
  "setOwnerAndContacts": true,
  "setOwner": true,
  "owner": {
    "firstname": "John",
    "lastname": "Eirik",
    "email": "johneirik@eksempel.no",
    "phone": "48165937",
    "companyname": "",
    "taxid": "",
    "type": "person",
    "addressline1": "Kasperudgata 48",
    "country": "NO",
    "state": "Ålesund",
    "postalcode": "4487",
    "city": "Ålesund"
  },
  "setAdmin": true,
  "admin": {
    "firstname": "Dag",
    "lastname": "Erik",
    "email": "dagerik@eksempel.no",
    "phone": "41283443",
    "companyname": "",
    "taxid": "",
    "type": "person",
    "addressline1": "Skihavnsvegen 93",
    "country": "NO",
    "state": "Oslo",
    "postalcode": "0347",
    "city": "Oslo"
  },
  "setTech": true,
  "tech": {
    "firstname": "Ragnar",
    "lastname": "Erikson",
    "email": "ragnarerikson@eksempel.no",
    "phone": "92648162",
    "companyname": "",
    "taxid": "",
    "type": "person",
    "addressline1": "Ørstadsvingen 34",
    "country": "NO",
    "state": "Kristiansand",
    "postalcode": "0182",
    "city": "Kristiansand"
  },
  "setBilling": true,
  "billing": {
    "firstname": "Hans",
    "lastname": "Petter",
    "email": "hanspetter@eksempel.no",
    "phone": "98328152",
    "companyname": "",
    "taxid": "",
    "type": "person",
    "addressline1": "Haugerstrandveien 56",
    "country": "NO",
    "state": "Gjøvik",
    "postalcode": "0671",
    "city": "Gjøvik"
  }
}
  • command: "OrderDomain"
  • token: string, required, must be a valid authentication token
  • clientid: string, the id of the client that will own the domain
  • domain: string, the domain name
  • operation: string, can be "register" or "transfer"
  • prepare: boolean, if true, the client can prepare the domain records on Deploi before doing the transfer.
  • authcode: string, the authorization code for a domain transfer
  • setOwnerAndContacts: boolean, if false, for "register" the contact details on the account will be used, for "transfer" the existing owner and contacts will be kept
  • setOwner: boolean, if true, the information of the owner provided will be used, if false, the information from the account will be used for owner.
  • owner: struct Contact, the legal owner of the domain
  • setAdmin: boolean, if true, the information from the provided admin will be used, if false, the account information will be used for administrative contact.
  • admin: struct Contact, the administrative contact of the domain
  • setTech: boolean, if true, the information from the technical contact will be used, if false, the account information will be used for technical contact
  • tech: struct Contact, the technical contact of the domain
  • setBilling: boolean, if true, the information from the billing contact will be used, if false, the account information will be used for the billing contact
  • billing: struct Contact, the billing contact of the domain

struct Contact:

  • firstname: string, the first name of the contact
  • lastname: string, the last name of the contact
  • email: string, the email of the contact
  • phone: string, the phone number of the contact
  • companyname: string, the name of the company
  • taxid: number, the company registration number
  • type: string (enumeration), type of registration, can be set to either "person" or "company"
  • addressline1: string, if type: "person", the person must use their home address, if type: "company", the company must use the address of the company
  • country: string, the country part of the address
  • state: string, the state part of the address
  • postalcode: number, the postal code of the address
  • city: string, the city part of the address

Response:

{
  "success": true,
  "message": "Domain order processing.",
  "messageId": 35
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteSiteDatabase

Deletes a database

Request:

{
  "command": "DeleteSiteDatabase",
  "token": "ABC123",
  "id": 1,
  "databaseid": 1,
}

  • command: string, "DeleteSiteDatabase"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • databaseid: number, required, the id of the database the user belongs to

Response:

{
  "success": true,
  "message": "Database deleted.",
  "messageId": 106
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetInvoices

Get invoices.

Request:

{
  "command": "GetInvoices",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 15
}
  • command: "GetInvoices"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "invoices": [
     {
       "id": 4714,
       "date": "2022-12-18",
       "due": "2023-01-01",
       "amount": "960",
       "cancelled": false
       "paid": true
     }
   ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • invoices: array of structures
    • id: number, the id of the invoice
    • date: string, date of the order
    • due: string, due date of invoice
    • amount: string, the amount as a string
    • cancelled: boolean, whether the invoice has been cancelled.
    • paid: boolean, whether the invoice has been paid.

ForgotPassword

Forgot a password to a server

Request:

{
  "command": "ForgotPassword",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "id": 1
}
  • command: "ForgotPassword"
  • token: string, required, must be a valid authentication token
  • id: number, the id of the agreement

Response:

{
  "success": true,
  "message": "Password request recieved.",
  "messageId": 84
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

Ping

Simple operation used to check if the API is up.

Request:

{
  "command": "Ping"
}
  • command: "Ping"

Response:

{
  "success": true,
  "data": "pong"
}
  • success: boolean
  • data: string, if contains "pong", then the service is running and responsive

GetFirewallReverseProxies

Get firewall reverse proxies.

Request:

{
   "command": "GetFirewallReverseProxies",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123
}


  • command: string, "GetFirewallReverseProxies"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  {
  "firewallReverseProxies": [
    {
      "name": "example.com brannmur",
      "id": 1
    },
    {
      "name": "test.no brannmur",
      "id": 2
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • firewallReverseProxies: array of structures
    • name: string, the name of the reverse proxy
    • id: number, the ID of the reverse proxy

AddFirewallPrivateNetwork

Add private networks to the firewall.

Request:

{
   "command": "AddFirewallPrivateNetwork",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123,
   "network": "192.168.2.1/24"
}
  • command: string, "AddFirewallPrivateNetwork"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall
  • network: string, the private network that get added to the firewall

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

EnableWAF

Enables the web application firewall.

Request:

{
  "command": "EnableWAF",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "EnableWAF"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "WAF is enabled.",
  "messageId": 90
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetBackupInfo

Get information and details on a backup plan.

Request:

{
  "command": "GetBackupInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "planid": "Disk-8-2-1"
}
  • command: "GetBackupInfo"
  • token: string, required, must be a valid authentication token
  • planid: string, required, the ID of the plan

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "slots": [
    {
      "interval": {
        "from": "2024-01-01",
        "to": "2024-01-07"
      },
      "name": "2024-01-01 04:00:02",
      "present": true
    },
    {
      "interval": {
        "from": "2023-12-25",
        "to": "2023-12-31"
      },
      "name": "2024-12-27 04:00:03",
      "present": true
    },
    {
      "interval": {
        "from": "2023-12-18",
        "to": "2023-12-24"
      },
      "name": "2024-12-20 04:00:04",
      "present": true
    },
    {
      "interval": {
        "from": "2023-12-11",
        "to": "2023-12-17"
      },
      "name": "2024-12-13 04:00:05",
      "present": true
    },
    {
      "type": "permanent",
      "interval": {},
      "name": "2024-12-06 04:00:06",
      "present": true
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • slots, array of structures
  • type: string, can be "interval" or "permanent"
  • interval: structure
    • from: string, the start of the backup interval
    • to: string, the end of the backup interval
  • name: string, the name of the backup
  • present: boolean, if true, the backup is present, if false, the backup is currently missing

CreateCertificate

Create a certificate.

Request:

{
   "command": "CreateCertificate",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1
}


  • command: string, CreateCertificate
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to create a certificate for

Response:

{
  "success": true,
  "message": "Certificate created.",
  "messageId": 107
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

ChangeNameServers

Change name servers of the domain

Request:

{
  "command": "ChangeNameServers",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "domain": "progsbase.com",
  "defaults": false,
  "nameservers": [
    "ns1.example.com",
    "ns2.example.com"
  ]
}
  • command: "ChangeNameServers"
  • token: string, required, must be a valid authentication token
  • domain: string, the domain name
  • defaults: boolean, if true, Deploi's default name servers are used, if false, the name servers are set by the customer
  • nameservers: array, list of name servers to be used for the domain

Response:

{
  "success": true,
  "message": "",
  "messageId": 74
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DisableWAF

Disables the web application firewall.

Request:

{
  "command": "DisableWAF",
  "token: "ABC123",
  "id": 1,
  "reverseProxyId": 1
}
  • command: string, "DisableWAF"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "WAF is disabled.",
  "messageId": 89
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

UpdateSiteDomains

Update the domains of a site

Request:

{
  "command": "UpdateSiteDomains",
  "token": "ABC123",
  "id: 1,
  "siteid": 1,
  "domains": [
    "test.com",
    "www.test.com"
  ]
}
  • command: string, "UpdateReverseProxy"
  • token: string, required, must be a valid authentication token
  • domains: array, required, Can be any valid domain names
  • siteid: number, required, the id of the site

Response:

{
  "success": true,
  "message": "Domains for site updated.",
  "messageId": 101
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetEmailAccountInfo

Get e-mail account information.

Request:

{
  "command": "GetEmailAccountInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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": "",
  "messageId": 0,
  
  "used": 0.2,
  "total": 10
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • used: number, the used GB of storage
  • total: number, the available GB of storage

InstallWordpress

Install wordpress on a site

Request:

{
   "command": "InstallWordpress",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1,
   "databaseid":1,
   "name":"testuser"
}


  • command: string, BackupSite
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to install wordpress on
  • databaseid: number, required, id of the database to use
  • name: string, required, the name of the databaseuser

Response:

{
  "success": true,
  "message": "WordPress installed.",
  "messageId": 119
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetFirewalls

Get the list of firewall services.

Request:

{
   "command": "GetFirewalls",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123
}
  • command: string, "GetFirewall"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "firewalls": [
    {
      "id": 675,
      "name": "Inductive Firewall",
      "tb": 1,
      "ipv4s": 1,
      "status": "active",
      "type": "ip"
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • firewalls: array of structures
    • id: number, the ID of the firewall service
    • name: string, name of the firewall
    • tb: number, the amount of terabytes that the firewall can process
    • ipv4s: number, the amount of public IPv4s on the firewall
    • status: string, the status of the firewall, can either be "active" or "off"
    • type: string, type of firewall, can either be "ip" or "waf"

RestartVirtualServer

Requests a graceful restart from the server's operating system.

Request:

{
  "command": "RestartVirtualServer"
  "token": "cebxfljqkzjyirqxvyxsbaxdq"
  "id": 123
}
  • command: "RestartVirtualServer"
  • token: string, required, must be a valid authentication token
  • id: number, required, id of the server service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup the localized message

GetDomainContacts

Get the domain contacts.

Request:

{
  "command": "GetDomainContacts",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "domain": "example.com"
}
  • command: string, "GetDomainContacts"
  • token: string, required, must be a valid authentication token
  • domain: string, the 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",
      "country": "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": "",
      "country": "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": "",
      "country": "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": "",
      "country": "NO",
      "addressLine1": "Main road 2",
      "addressLine2": "Flr. 1",
      "postalCode": "9387",
      "city": "Oslo",
      "phone": "(+47) 57395475",
      "email": "bobtest@test.com"
    }
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • 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, the ID of the contact, automatically created upon registration by deploi
  • firstName: string, the firstname of the contact
  • lastName: string, the lastname of the contact
  • company: boolean, is company or person
  • companyName: string, the name of the company
  • companyID: string, the ID of the company
  • country: string, the country of the contact
  • addressLine1: string, the address of the contact
  • addressLine2: string, second address of the contact
  • postalCode: string, the postal code of the address
  • city: string, the city of the address
  • phone: string, the phone number of the contact
  • email: string, the email of the contact

GetAccountInfo

Get account information.

Request:

{
  "command": "GetAccountInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetAccountInfo"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "accountInfo": {
      "id": 123,
      "firstname": "Bob",
      "lastname": "Jensen",
      "email": "bob@company.com",
      "phone": "1393927405",
      "type": "company",
      "companyname": "Company Ltd",
      "legalentityid": "53942340929",
      "addressline1": "Majorstreet 1",
      "addressline2": "",
      "city": "New Sidney",
      "postalcode": "23902",
      "countrycode": "US",
      "agreedtotac": true,
      "receiveinfo": true,
      "ehfinvoice": false,
      "autocreate": true
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • accountinfo: structure of account information
    • loggedin: boolean, whether the user is logged in or not
    • firstname: string, the first name of the contact
    • lastname: string, the last name of the contact
    • email: string, the email of the contact
    • phone: string, the phone number of the contact
    • type: string, either "company" or "person"
    • companyname: string, the name of the company
    • legalentityid: string, the ID of the legal entity
    • addressline1: string, if type: person, the person must use their home address, if type: company, the company must use the address of the company
    • addressline2: string, additional address information
    • city: string, the city part of the address
    • postalcode: string, the postal code of the address
    • countrycode: string, two letter country code, ISO 3166-1 alpha-2
    • agreedtotac: boolean, must be true, the agreement of the terms and conditions
    • receiveinfo: boolean, if true, the customer will receive newsletters
    • ehfinvoice: boolean, if true, customer will receive invoices using EHF
    • autocreate: boolean, whether the client can automatically provision services

GetDatabases

Get managed databases

Request:

{
  "command": "GetDatabases",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetDatabases"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client that views the databases

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  "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, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • databases: array of structures
    • id: number, the ID from the agreement to the specific service delivered by Deploi.
    • 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

UpdateDomainContact

Update the contact of the domain.

Request:

{
  "command": "UpdateDomainContact",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "domain": "inductive.no",
  "contact": "admin",
  "info": {
    "id": "n-jm6375",
    "firstName": "Jonas",
    "lastName": "Sveinsen",
    "company": false,
    "companyName": "",
    "companyID": "",
    "country": "NO",
    "addressLine1": "Main road 2",
    "addressLine2": "Flr. 1",
    "postalCode": "9387",
    "city": "Oslo",
    "phone": "(+47) 57395475",
    "email": "bobtest@test.com"
  }
}
  • command: string, "UpdateDomainContact"
  • token: string, required, must be a valid authentication token
  • domain: string, domain name
  • contact: string, the type of contact, can be "owener", "admin", "tech" or "billing"
  • info: structure
    • id: string, the ID of the contact, automatically created upon registration by Deploi
    • firstName: string, the first name of the contact
    • lastName: string, the last name of the contact
    • company: boolean, whether the domain is owned by a company
    • companyName: string, the company name
    • companyID: string, the ID of the company
    • country: string, country code of the country of the owner
    • addressLine1: string, address of the contact
    • addressLine2: string, additional address information
    • postalCode: string, the postal code part of the address
    • city: the city part of the address
    • phone: string, phone number of the contact
    • email, string, email address of the contact

Response:

{
  "success": true,
  "message": "Owner or contact change processing.",
  "messageId": 73,
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

UpdateReverseProxy

Update reverse proxy information

Request:

{
  "command": "UpdateReverseProxy",
  "token": "ABC123",
  "id: 1,
  "reverseProxyId: 1,
  "setName: false,
  "name: "test.com WAF",
  "setDomains: true,
  "domains": [
    "test.com",
    "www.test.com"
  ],
  "setForwardTo: false,
  "forwardTo: "192.168.0.0",
  "setValidateSourceCert: false,
  "validateSourceCert": false
}
  • command: string, "UpdateReverseProxy"
  • token: string, required, must be a valid authentication token
  • domains: array, required, Can be any valid domain names
  • forwardTo: string, required, which IP-adress you want to forward to
  • reverseProxyId: number, required, the id of the reverseproxy site
  • id: number, required, the id of the product
  • setDomains: boolean, required, sets if domains are to be edited or not
  • setForwardTo boolean, required, sets if the ForwardTo adress is to be changed
  • setName: boolean, required, sets if the Name should be changed
  • setValidateSourceCert: boolean, required, sets if the validation of a source certificate should be changed
  • validateSourceCert: boolean, validates the source certificate

Response:

{
  "success": true,
  "message": "ReverseProxy updated.",
  "messageId": 85
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteDomainRecord

Delete a domain record.

Request:

{
   "command":"DeleteDomainRecord",
   "token":"cebxfljqkzjyirqxvyxsbaxdq",
   "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"
  • domain: string, the domain name
  • host: string, the subdomain, API supports giving the whole domain
  • value: string, the value of the domain record, what the value should be is determined by the record type

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • 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. The password of the user.
  • secondfactor: string, optional. Two factor code for two factor authentication.

Response:

{
  "success": true,
  "message": "Login successful.",
  "messageId": 0,
  
  "data": {
    "token": "cebxfljqkzjyirqxvyxsbaxdq",
    "clients": [
      {
         "id": 123,
         "name": "Company A"
      },
      {
         "id": 321,
         "name": "Company B"
      }
    ]
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId, number, ID to lookup localized messages
  • data: structure, optional
    • token: string, login token to be passed with subsequent requests
    • clients: array of structures, the clients the user has access to
      • id: the ID of the user
      • name: the name of the company

GetEmailProducts

Get Email services.

Request:

{
  "command": "GetEmailProducts",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetEmailProducts"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId" 0,
  
  "emailProducts": [
    {
      "id": 517,
      "email": "test@deploi.com",
      "type": "account",
      "used": 26,
      "total": 74
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • emailProducts: array of structures
    • id: number, the ID of the agreement to the specific service delivered by Deploi.
    • email: string, the email address
    • type: string, account or transactional
    • used: number, the used GB of storage
    • total: number, the available GB of storage

UpdateDomainRecord

Update a domain record.

Request:

{
  "command": "UpdateDomainRecord",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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, "UpdateDomainRecord"
  • token: string, required, must be a valid authentication token
  • type: string, required, can be "A", "AAAA", "TXT", "MX", "CNAME", "SOA" and "SRV"
  • from: structure
    • host: string, required, the subdomain, API supports giving the whole domain
    • value: string, required, the value of the domain record, what the value should be is determined by the record type
    • options: structure
      • ttl: number, time to live in seconds
      • service: string, the symbolic name of the desired service
      • protocol: string, the type of protocol, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535
  • to: structure
    • host: string, required, the subdomain, API supports giving the whole domain
    • value: string, required, the value of the domain record, what the value should be is determined by the record type
    • options: structure
      • ttl: number, time to live in seconds
      • service: string, the symbolic name of the desired service
      • protocol: string, the type of protocol, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535

Response:

{
  "success": true,
  "message": "Record updated.",
  "messageId": 61
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

CreateFirewallCertificate

Creates a certificate for the domains.

Request:

  "command": "CreateFirewallCertificate",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "CreateFirewallCertificate"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "Certificate created.",
  "messageId": 86
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetKubernetesInfo

Get information about a Kubernetes account.

Request:

{
  "command": "GetKubernetesInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • 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.

DuplicateWordpress

Create a database on Deploi's managed database solution.

Request:

{
  "command": "DuplicateWordpress",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "type": "forge",
  "id": 123,
  "siteId: 1231231",
  "newDomain": "new.example.com"
}
  • command: "DuplicateWordpress"
  • token: string, required, must be a valid authentication token
  • type: string, the underlying system that delivers WordPress. Can be "forge" or "deploihosted"
  • id: number, the ID of the WordPress service
  • siteId: number, the ID of the WordPress site that gets duplicated
  • newDomain: string, the domain of the duplicated WordPress site

Response:

{
  "success": true,
  "message": "Duplicating site succeeded.",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetServerInfo

List server information.

Request:

{
  "command": "GetServerInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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": "",
  "messageId": 0,
  
  "serverInfo": {
    "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, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • serverInfo: structure
    • type: string, the underlying technology used to deliver the server
    • virtual: structure
      • mainip: string, the main IP address of the server
      • ram: number, the amount of RAM in GB
      • cpu: number, the number of CPU cores
      • disks: array of structures
        • id: number, the ID of the disk service
        • type: string, type of disk, can either be "ssd" or "hdd"
        • size: number, the size of the disk in GB
      • suspended: boolean, if true, the server has been suspended
      • running: boolean, if true, the server is up and running
      • ips: array, list of IPs used on the server
  • licenses: array of strings, licenses associated with the server

MonitorCPU

Gets CPU usage information

Request

{
  "command": "MonitorCPU",
  "token": abc123,
  "id": 748
}
  • command: "MonitorCPU"
  • token: string, required, must be a valid authentication token

Response

{
  "success": true,
  "data":
  {
    "average":"1.00",
    "total":"4",
    "used":25
  }
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • total: string, total amount of cpu
  • average: string, average cpu use the last 15 minutes
  • used%: string, percentage of cpu used

CreateDatabaseUser

Create a user for a database.

Request:

{
   "command": "CreateDatabaseUser",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "username": "testuser",
   "password": "testpassword"
}


  • command: string, CreateDatabaseUser
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID
  • username: string, username of the new databaseuser
  • password: string, the password for the databaseuser

Response:

{
  "success": true,
  "message": "Databaseuser created.",
  "messageId": 104
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

UpdateVirtualServer

Change resources of a virtual server.

Request:

{
  "command": "UpdateVirtualServer",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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 service
  • setCpu: boolean, whether to change the amount of CPU resources
  • cpucent: number, new CPU amount
  • setRam: boolean, whether to change the amount of RAM
  • ram: number, new amount of RAM in GB
  • diskChange: array of structures
    • id: string, the ID of the disk to change
    • size: number, the new size of the disk in GB

Response:

{
  "success": true,
  "message": "Request to change server resources received.",
  "messageId": 63
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetAlerts

Get alerts.

Request:

{
  "command": "GetAlerts",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetAlerts"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "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, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • alerts: array
    • id: number, the ID of the alert service.
    • 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

DisableGeoBlock

Disables the geoblocking.

Request:

{
  "command: "DisableGeoBlock",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "DisableGeoBlock"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "GeoBlock is disabled.",
  "messageId": 91
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

AddFirewallRule

Add firewall rule.

Request:

{
   "command": "AddFirewallRule",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123,
   "src-cidr": "192.0.2.0/8",
   "src-ip": "192.0.2.2",
   "src-port": 59375,
   "dst-ip": "10.0.1.5",
   "dst-port": 22
}


  • command: string, "AddFirewallRule"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall
  • src-cidr: string, cidr of allowed addresses
  • src-ip: string, public IP to expose
  • src-port: number, port to expose on the public IP
  • dst-ip: string, private IP to expose on the public IP
  • dst-port: number, port to expose on the public port

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, id used to lookup localized messages

GetSiteBackups

Gets the backups of a spesific site

Request

{
  "command": "GetSiteBackups",
  "token": abc123,
  "siteid":1
}
  • command: "GetSiteBackups"
  • token: string, required, must be a valid authentication token
  • siteid: number, required, the site you want to get the backups for

Response

{
  "success": true,
  "data": [
  {
  "datetime":"2025:04:18T02:59:50",
  "backupid": 1
  }
  ]
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • datetime: string, the date and time of the backup in iso format
  • backupid: number, the id of the backup

GetWordpress

Get managed WordPress websites.

Request:

{
  "command": "GetWordpress",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetWordpress"
  • token: string, required, must be a valid authentication token
  • clientid: number, ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "wordpresses": [
   {
     "type": "deploihosted",
     "id": 569,
     "domain": "example.cloud",
     "deploihosted": {
       "ram": 8,
       "cpu": 400,
       "disk": 20,
     },
     "forge": {
       "siteId": 0,
       "serverId": 0 
     }
   }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID to lookup localized messages
  • wordpresses: array of structures
    • type: string, can be "deploihosted" or "forge"
    • id: number, the ID of the WordPress service
    • domain: string, the domain name used for the WordPress service
    • deploihosted: structure
      • ram: RAM quota for the website
      • cpu: CPU-cent quota for the website
      • disk: disk quota for the website
    • forge: structure
      • siteId: number, the Forge site ID
      • serverId: number, the Forge server ID

CreateReverseProxy

Create reverse proxy of WAF firewall.

Request:

{
  "command": "CreateReverseProxy",
  "token": "abc",
  "id": 5,
  "data": {
    "name": "Test",
    "domains":[
      "example.com",
      "www.example.com"
    ],
    "forwardToIP": "192.168.0.5"
  }
}


  • command: string, "CreateReverseProxy"
  • token: string, required, must be a valid authentication token
  • id: number, service ID
  • name: string, name of reverse proxy site
  • domains: array of strings, list of domains
  • forwardToIP: string, IPv4, IPv4 address of server with website or web service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetDomains

Get domain list for account.

Request:

{
  "command": "GetDomains",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetDomains"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "domains": [
    {
      "name": "inductive.no", 
      "id": "7",
      "status": "active",
      "registrationDate": "2015-06-01", 
      "expiryDate": "2023-06-01", 
      "nextDueDate": "2023-05-01"
    }
  ]
}
  • success: boolean, whether the request was successful or not.
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • domains: array of structures
    • name: string, The domain name.
    • id: number, The Deploi domain ID.
    • status: string, the status of the domain
    • registrationDate: date, the date the domain was registered. Fetched from registrar.
    • expiryDate: date, the date the domain will expire. Fetched from registrar.
    • nextDueDate: date, the next date renewabl will be billed. Fetched from Deploi.

GetBackupPlans

List backup plans.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "backupPlans": [
    {
      "id": "Disk-8-2-1",
      "location": 1,
      "daily": 0,
      "weekly": 5,
      "monthly": 0,
      "yearly": 0,
      "backupof": "Disk",
      "objectid": "8",
      "objectname": "Inductive Web Server Disk"
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages.
  • backupPlans: array of structures.
    • id: string, ID of backup plan.
    • backupof: string, what is backed up.
    • objectid: string, ID of what is being backed up.
    • objectname: string, name of what is backed 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.

BackupSite

Takes a backup of a site.

Request:

{
   "command": "BackupSite",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1
}


  • command: string, BackupSite
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to backup.

Response:

{
  "success": true,
  "message": "Backup taken.",
  "messageId": 111
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetDisks

List disks.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "disks": [
    {
      "id": "hwe30nflge",
      "name": "Datadisk",
      "type": "SSD",
      "technology": "internal",
      "size": 42949672960
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • 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

GetDomainNameServers

Get the records of a domain.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "records": [
    {
      "type": "NS",
      "value": "ns1.examplens.com.",
      "host": "example.com"
    },
    {
      "type": "NS",
      "value": "ns2.examplens.com.",
      "host": "example.com"
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • records: arrays of structure
    • type: string, always "NS"
    • host: string, the domain
    • value: string, the nameserver

AddFirewallPrivateNetworkConnector

Add private network connector to the firewall.

Request:

{
   "command": "AddFirewallPrivateNetworkConnector",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123,
   "network": "192.168.2.1/24",
   "local": "10.0.0.47",
   "remote": "10.0.0.204"
}
  • command: string, "AddFirewallPrivateNetworkConnector"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall
  • network: string, the private network that get added to the firewall
  • local: string, local IP address of the connector
  • remote: string, IP address of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

CreateSiteDatabase

Create a database.

Request:

{
   "command": "CreateSiteDatabase",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
}


  • command: string, CreateSiteDatabase
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID

Response:

{
  "success": true,
  "message": "Database created.",
  "data": 1
  "messageId": 105
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteCertificate

Delete a certificate.

Request:

{
   "command": "DeleteCertificate",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1
}


  • command: string, DeleteCertificate
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to create a certificate for

Response:

{
  "success": true,
  "message": "Certificate deleted.",
  "messageId": 108
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetUserInfo

Get user information.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "userInfo": {
      "id": 432,
      "firstname": "Bob",
      "lastname": "Jensen",
      "email": "bob@company.com",
      "twoFactorAuthentication": false,
      "accounts": [
         123,
         321
      ]
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, id used to lookup localized messages
  • userInfo: structure
    • id: string, the ID of the user
    • firstname: string, first name of the user
    • lastname: string, last name of the user
    • email: string, email of the user
    • twoFactorAuthentication: boolean, if true, two factor verification is enabled
    • accounts: array of numbers, the IDs of the accounts where the user has administrative rights

EnableGeoBlock

Enables the geoblocking.

Request:

{
  "command: "EnableGeoBlock",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "EnableGeoBlock"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "GeoBlock is enabled.",
  "messageId": 92
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

UpdateAccountInfo

Update account information for an account.

Request:

{
  "command": "UpdateAccountInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123,
  "settype": false,
  "type": "",
  "setcompanyname": true,
  "companyname": "New Company",
  "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, required, the ID of the client
  • settype: boolean, required, if true, the client requests to change the type
  • type: string, required, can be set to either "company" or "person"
  • setcompanyname: boolean, required, if true, the client requests to change the company name
  • companyname: string, the name of the company
  • setlegalentityid: boolean, required, if true, the client requests to change the legal entity id
  • legalentityid: string, the legal entity ID of the company
  • setfirstname: boolean, required, if true, the client requests to change the first name
  • firstname: string, the first name of the contact
  • setlastname: boolean, required, if true, the client has changed the last name
  • lastname: string, the last name of the contact
  • setemail: boolean, required, if true, the client has changed the e-mail
  • email: string, the email of the contact
  • setphone: boolean, required, if true, the client has changed the phone number
  • phone: string, the phone number of the contact
  • setaddressline1: boolean, required, if true, the client has changed address line 1
  • addressline1: string, if type: "person", the person must use their home address, if type: "company", the company must use the address of the company
  • setaddressline2: boolean, required, if true, the client has changed address line 2
  • addressline2: string, additional address information
  • setpostalcode: boolean, required, if true, the client has changed the postal code
  • postalcode: string, the postal code of the address
  • setcity: boolean, required, if true, the client has changed the city
  • city: string, the city part of the address
  • setstate: boolean, required, if true, the client has changed the state
  • state: string, the state of the address
  • setcountrycode: boolean, required, if true, the client has changed the country code
  • countrycode: string, the countrycode part of the address
  • setEhfInvoice: boolean, required, the client has changed whether to send EHF invoices
  • ehfinvoice: boolean, required, if true, customer will receive invoices using EHF
  • setagreedtotac: boolean, required, if true, the client has requested to change acceptence of terms and conditions
  • agreedtotac: boolean, required, must be true, the agreement of the terms and conditions
  • setreceiveinfo: boolean, required, if set, the client requests a change of receiving newsletters
  • receiveinfo: boolean, required, if true, the customer will receive newsletters

Response:

{
  "success": true,
  "message": "The request has been received and is being processed.",
  "messageId": 65
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetFirewallPrivateNetworks

Get the private networks of the firewall.

Request:

{
   "command": "GetFirewallPrivateNetworks",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123
}


  • command: string, "GetFirewallPrivateNetworks"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
 "privateNetworks": [  
   {
     "network": "192.168.0.1/24",
     "name": "br0",
     "connectors": [
       {
         "name": "gre0_2",
         "local": "10.0.0.47",
         "remote": "10.0.0.202",
         "ip": "192.168.0.2"
       }
     ]
   },
   {
     "network": "192.168.1.1/24",
     "name": "br1",
     "connectors": [
       {
         "name": "gre1_2",
         "local": "10.0.0.47",
         "remote": "10.0.0.204",
         "ip": "192.168.1.2"
       }
     ]
   },
   {
     "network": "192.168.2.1/24",
     "name": "br2",
     "connectors": []
   }
 ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • privateNetworks: array of structures, list of the private networks
    • network: string, the network CIDR
    • name: name of the private network
    • connectors: array of structures
      • name: string, name of the connector
      • local: string, the IP of the connector server
      • remote: string, IP if the connector client
      • ip: string, assigned IP address on the virtual network

GetReverseProxyInfo

Get reverse proxy information.

Request:

{
  "command": "GetReverseProxyInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "id": 432,
  "reverseProxyId": 1
}
  • command: "GetReverseProxyInfo"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "reverseProxyInfo": {
    "forwardTo": "192.168.10.8",
    "name": "test.com WAF",
    "siteadminemail": "martin.tuhus@deploi.com",
    "domains": [
      "deploj.com",
      "www.deploj.com"
    ],
    "siteid": 7,
    "wafEnabled": true,
    "crsEnabled": true,
    "validateSourceCert": false,
    "certCreated": true,
    "wafMode": "On",
    "geoBlockActivated": true,
    "blockList": [
      "RU",
      "CN",
      "KP"
    ],
    "allowList": [
      "NO",
      "SE",
      "DK"
    ],
    "geoBlock": true,
    "geoAllow": true,
    "blockingParanoiaLevel": 1,
    "logParanoiaLevel": 2
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • reverseProxyInfo

GetServers

List servers.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "servers": [
    {
      "id": 2,
      "name": "testvps",
      "type": "virtual",
      "ram": 2,
      "cpu": 1,
      "disk": 10,
      "status": "active"
    }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • servers: array of structures
    • id: number, the ID of the server service
    • name: string, name of server at Deploi
    • type: type server: virtual or dedicated
    • ram: number, the amount of GB in ram
    • cpu: number, the amount of processors
    • disk: number, the size of the disk in GB
    • status: string, the status of the server, options are: "creating", "active" and "off"

GetSite

Gets information for a site.

Request

{
  "command": "GetSite",
  "token": abc123,
  "siteid": 1
}
  • command: "GetSite"
  • token: string, required, must be a valid authentication token
  • siteid: number, the site you want to get information from.

Response

{
  "success": true,
  "data": {
  "domene": ["test.com", "www.test.com"],
  "name": "Testuser1",
  "certificate": false
  },
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • domene: array, domener som tilhører siden.
  • certifificate: boolean, er det opprettet et sertifikat for siden
  • name: string, navnet på brukeren til siden

RestoreSiteFromBackup

Restores a site from backup.

Request:

{
   "command": "RestoreSiteFromBackup",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1,
   "backupid":1
}


  • command: string, RestoreSiteFromBackup
  • token: string, required, must be a valid authentication token
  • clientid: number, required, client ID
  • siteid: number, required, id of the site to backup
  • backupid: number, required, id of the backup

Response:

{
  "success": true,
  "message": "Site restored from backup.",
  "messageId": 110
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteFirewallRule

Delete a firewall rule.

Request:

{
   "command": "DeleteFirewallRule",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123,
   "src-cidr": "192.0.2.0/8",
   "src-ip": "192.0.2.2",
   "src-port": 59375,
   "dst-ip": "10.0.1.5",
   "dst-port": 22,
   "protocol": "tpc",
}


  • command: string, "DeleteFirewallRule"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service
  • src-cidr: string, CIDR of allowed addresses
  • src-ip: string, public IP to expose
  • src-port: number, port to expose on the public IP
  • dst-ip: string, private IP to expose on the public IP
  • dst-port: number, port to expose on the public port
  • protocol: string, tcp or udp

Response:

{
  "success": true,
  "message": "",
  "messageId": 1
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetLogStatistics

Get statiscs from the WAF logs

Request:

{
  "command: "GetLogStatistics",
  "token": "ABC123",
  "id": 1,
  "reverseProxyId": 1
}

  • command: string, "GetLogStatistics"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • reverseProxyId: number, required, the id of the reverseproxy site

Response:

{
  "success": true,
  "message": "Fetched log statistics.",
  "messageId": 91
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetSiteDatabase

Gets database information for a specified site.

Request

{
  "command": "GetSiteDatabase",
  "token": abc123,
  "siteid":1
}
  • command: "GetSiteDatabase"
  • token: string, required, must be a valid authentication token
  • siteid: number, required, the site you want to see database info for

Response

{
  "success": true,
  "data": [
             {
              "databaseid": 1,
              "primarydomain": "test.com",
              "founduniqueprimarydomain": true
              },
  ],
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • primarydomain: string, hoveddomenet til siden
  • databaseid: number, the id of the database
  • founduniqueprimarydomian: boolean, does the primary domain belong to multiple databases

GetDomainAuthCode

Send the auth code for a domain to its owner on e-mail.

Request:

{
  "command": "GetDomainAuthCode",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "domain": "example.com"

}
  • command: "GetDomainAuthCode"
  • token: string, required, must be a valid authentication token
  • domain: string, domain name

Response:

{
  "success": true,
  "message": "",
  "messageId": 83
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteFirewallPrivateNetworkConnector

Delete private network connector from the firewall.

Request:

{
  "command": "DeleteFirewallPrivateNetworkConnector",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "id": 675,
  "network": "192.168.0.1/24",
  "connector": "gre0_2"
}
  • command: string, "DeleteFirewallPrivateNetworkConnector"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service
  • network: string, the private network connector that get deleted from the firewall
  • connector: string, the name of the virtual network port that get deleted

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

MonitorRAM

Gets RAM usage information

Request

{
  "command": "MonitorRAM",
  "token": abc123,
  "id": 748
}
  • command: "MonitorRAM"
  • token: string, required, must be a valid authentication token

Response

{
  "success": true,
  "data":
  {
    "total":"4105490432",
    "available":"1694486528",
    "used":41.2736689091375
  }
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • total: string, total amount of ram
  • available: string, ram available for use
  • used%: string, percentage of ram used

GetInvoiceInfo

Get invoice information.

Request:

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

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "invoiceInfo": {
    "date": "2022-12-18",
    "due": "2023-01-01",
    "amount": "960",
    "cancelled": false
    "paid": true,
    "lines": [
        {
            "description": "Server",
            "amount": "960"
        }
    ]
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • invoiceInfo: structure
    • date: string, date of the invoice
    • due: string, when the invoice is due
    • amount: string, the payable amount of the invoice
    • cancelled: boolean, whether the invoice has been cancelled
    • paid: boolean, whether the invoice has been paid
    • lines: array of structures, contains order lines with one service on each line
      • description: string, a description of the invoice
      • amount: number, the order line amount

DeleteFirewallPrivateNetwork

Delete private network from the firewall.

Request:

{
   "command": "DeleteFirewallPrivateNetwork",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "id": 123,
   "network": "192.168.2.1/24"
}
  • command: string, "DeleteFirewallPrivateNetwork"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service
  • network: string, the private network that get deleted from the firewall

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetKubeConfig

Get Kubernetes config file for managed Kubernetes account.

Request:

{
  "command": "GetKubeConfig",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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": "apiVersion: v1..."
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • kubeconfig: string, the kube config file contents

DomainAvailable

Check if a domain is available.

Request:

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

Response:

{
  "success": true,
  "message": "success",
  "messageId": 10,
  
  "available": false
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • available: boolean, whether the domain is available or not

GetSSHKeys

Gets ssh keys for a site

Request

{
  "command": "GetSSHKeys",
  "token": abc123,
  "filteredbysite": false,
  "siteid":1
  
}
  • command: "GetSSHKeys"
  • token: string, required, must be a valid authentication token
  • filteredbysite: boolean, wheter or not to only show ssh keys for a specified site
  • siteid: number, required, the site you want to see database info for

Response

{
  "success": true,
  "data":[
            {
            "siteid":1,
            "keyname":"testkeyname",
            "key":"key",
            "primarydomain":"test3.deploj.com"
            }
         ]
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • primarydomain: string, hoveddomenet til siden
  • siteid: number, required, the site you want to see database info for
  • keyname: string, name of the key
  • key: string, the ssh-key

GetSites

Gets information of all sites

Request

{
  "command": "GetSites",
  "token": abc123
}
  • command: "GetSites"
  • token: string, required, must be a valid authentication token

Response

{
  "success": true,
  "data": [
        {
            "siteid": 1,
            "primarydomain": "test.com"
        },
  ],
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • primarydomain: string, hoveddomenet til siden
  • siteid: number, the id of the site.

AddSSHKey

Add a ssh-key for a user

Request:

{
   "command": "AddSSHKey",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "keyname": "testkey",
   "key": "key",
   "name": "testuser"
}


  • command: string, AddSSHKey
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID
  • keyname: string, name for the ssh-key
  • key: string, an ssh-key
  • name: string, name of the user you create a ssh-key for

Response:

{
  "success": true,
  "message": "Added a new ssh-key for user.",
  "messageId": 113
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetDomainRecords

Get the records of a domain.

Request:

{
  "command": "GetDomainRecords",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "domain": "example.com"
}
  • command: string, "GetDomainRecords"
  • token: string, required, must be a valid authentication token
  • domain: string, the 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, if success is false, a description of the problem that occurred
  • 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, the subdomain, API supports giving the whole domain
    • value: string, the value of the domain record, what the value should be is determined by the record type
    • options: structure
      • ttl: number, time to live in seconds
      • serviceSet: boolean, if false, service is not set, if true, service is set
      • service: string, the type of service, can be
      • protocolSet: boolean, if false, protocol is not set, if true, protocol is set
      • protocol: string, can be "tcp", "udp" or "tls"
      • priority: number, 0 - 65535
      • weight: number, 0 - 65535
      • port: number, 0 - 65535

OrderEmailService

Order an email service.

Request:

{
   "command": "OrderEmailService",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 17,
   "emailtype": "account",
   "addresses": [
     "bob@example.com"
   ],
   "blocks": 1,
   "invoiceterm": "yearly"
}
  • command: string, "OrderEmailService"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client
  • emailtype: string, type of email service, can be "account", "transactional", "m365basic", "m365standard" or "m365premium".
  • addresses: array, list of the email addresses
  • blocks: number, for "transactional", 1 block equals sending of 10 000 emails per month
  • invoiceterm: string, defines the payment intervals, can either be "monthly" or "yearly"

Response:

{
  "success": true,
  "message": "Email order processing.",
  "messageId": 71
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

CreateFirewall

Create firewall.

Request:

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


  • command: string, "CreateFirewall"
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID
  • name: string, name of firewall
  • tb: number, terabytes of data processing per month
  • ipv4s: number, number of public IPv4 addresses to assign to the firewall
  • type: string, either "ip" or "waf"

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetVPNs

Get VPN services.

Request:

{
  "command": "GetVPNs",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetVPNs"
  • token: string, required, must be a valid authentication token
  • clientid: ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "vpns": [
   {
     "id": 565,
     "username": "username1",
     "ip": "192.0.2.14"
   }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID to lookup localized messages
  • vpns: array of structures
    • id: number, the ID from the agreement to the specific service delivered by Deploi.
    • username: string, the username of the VPN account
    • ip: string, the IP address of the customer in the VPN

Logout

Log out of an account.

Request:

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

Response:

{
  "success": true,
  "message": "Logout successful."
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred

DuplicateSite

Duplicate a site.

Request:

{
   "command": "DuplicateSite",
   "token": "cebxfljqkzjyirqxvyxsbaxdq",
   "clientid": 123,
   "siteid": 1,
   "usedifferentuser": true,
   "name": "testuser"
}


  • command: string, DuplicateSite
  • token: string, required, must be a valid authentication token
  • clientid: number, client ID
  • siteid: number, id of the site you want to duplicate
  • usedifferentuser: boolean, should a new user be created?
  • name: string, name of the user

Response:

{
  "success": true,
  "message": "Duplicated site.",
  "messageId": 118
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

Register

Register a new account.

Request:

{
  "command": "Register",
  "firstname": "John",
  "lastname": "Reugers",
  "email": "example@mail.no",
  "phone": "98162249",
  "password": "mcyf3ZA5uQGfm7S",
  "type": "company",
  "companyname": "example company",
  "taxid": "39346459374947",
  "addressline1": "Gardveien 11",
  "addressline2": "",
  "city": "Oslo",
  "state": "",
  "postalcode": "0193",
  "country": "NO",
  "agreedtotac": true,
  "receiveinfo": false,
  "ehfinvoice": false
}

  • command: "Register"
  • firstname: string, required, the first name of the contact person
  • lastname: string, required, the last name of the contact person
  • email: string, required, must be valid email, the email of the contact person
  • phone: string, required, must be valid phone number, the phone number of the contact person
  • password: string, required, the password of the user
  • 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
  • addressline1: string, required, if type: "person", the person must use their home address, if type: "company", the company must use the address of the company
  • addressline2: string, additional address information
  • city: string, required, the city part of the address
  • state: string, the state part of the address
  • postalcode: string, required, postal code of the address
  • country: two characters country code, required, must be valid country code
  • agreedtotac: boolean, required, must be true, the agreement of the terms and conditions
  • receiveinfo: boolean, required, if true, the customer will receive newsletters
  • ehfinvoice: boolean, required, if true, customer will receive invoices using EHF

Response:

{
  "success": true,
  "message": "Registration successful.",
  "messageId": 1
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetWordpressInfo

Get information from managed WordPress websites.

Request:

{
  "command": "GetWordpressInfo",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "id": 748,
  "domain": "www.example.com",
  "siteid": 1946388
}
  • command: "GetWordpressInfo"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the WordPress service
  • domain: string, the domain name of the WordPress website
  • siteid: number, the ID of the WordPress website

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "wordpressInfo": {
    "SSL": true
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • wordpressInfo: structure
    • SSL: boolean, if true, SSL is active for the domain and website

SetEmailPassword

Set password for an email account.

Request:

{
  "command": "SetEmailPassword",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "address": "bob@example.com",
  "password": "Verystrongpassword765"
}
  • command: "SetEmailPassword"
  • token: string, required, must be a valid authentication token
  • address: string, required, the email address the password will be set for
  • password: string, the password of the email account

Response:

{
  "success": true,
  "message": "",
  "messageId": 0
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

CancelAgreement

Cancel an agreement

Request:

{
  "command": "CancelAgreement",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "id": 1,
  cancellationmessage, "message"

}
  • command: "CancelAgreement"
  • token: string, required, must be a valid authentication token
  • id: number, the id of the agreement
  • cancellationmessage: string, the reason for cancelling the agreement, optional

Response:

{
  "success": true,
  "message": "",
  "messageId": 82
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

GetDatabaseUser

Gets the users for a specified database.

Request

{
  "command": "GetDatabaseUser",
  "token": abc123,
  "databaseid":1
}
  • command: "GetDatabaseUser"
  • token: string, required, must be a valid authentication token
  • databaseid: number, required, the database you want to get the users of

Response

{
  "success": true,
  "data": [
  {
  "name": "Testuser1"
  },
  {
  "name": "Testuser2"
  }
  ]
  "message": ""
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • name: string, the name(s) of the users for the database

GetKubernetes

Get managed Kubernetes services.

Request:

{
  "command": "GetKubernetes",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "clientid": 123
}
  • command: "GetKubernetes"
  • token: string, required, must be a valid authentication token
  • clientid: number, the ID of the client

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  "kubernetes": [
   {
     "id": 565,
     "ram": 8,
     "cpu": 4,
     "disk": 20
   }
  ]
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • kubernetes: array of structures
    • id: number, the ID of the Kubernetes service
    • ram: RAM quota for all systems
    • cpu: CPU quota for all systems
    • disk: disk quota for all storage

CreateVirtualServer

Create virtual server.

Request:

{
  "command": "CreateVirtualServer",
  "token": "cebxfljqkzjyirqxvyxsbaxdq",
  "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": [],
  "username": "bob",
  "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
    • idSet: boolean, if true, the ID of the disk has been set
    • id: number, the ID of the disk
    • name: string, name of disk
    • size: number, size in GB
    • type: string, can be "ssd", "hdd"
    • backupSpecs, structure
      • profileIdSet: boolean
      • profileId: number, backup profile ID, where the different backup profiles contain premade backup intervals
      • spec: structure, containing specifications of intervals and location for backup
        • 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
        • loc: string, location alternatives, can either be 1 or 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"
  • username string, a username for a user with sudo-access
  • password: string, the password of the user
  • publickey: string, the public key that the user can login with
  • allowRemotePasswordLogin: boolean. Allow remote password login. Not recommended

Response:

{
  "success": true,
  "message": "Server ordered.",
  "messageId": 10
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, id used to lookup localized messages

GetFirewallRules

Get firewall rules.

Request:

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


  • command: string, "GetFirewallRules"
  • token: string, required, must be a valid authentication token
  • id: number, the ID of the firewall service

Response:

{
  "success": true,
  "message": "",
  "messageId": 0,
  
  {
  "firewallRules": 
  {
    "packets": 47019053,
    "bytes": 4822532426,
    "rules": [
      {
        "packets": 68,
        "bytes": 3464,
        "protocol": "tcp",
        "src-network": "0.0.0.0",
        "src-cidr": 0,
        "src-ip": "193.69.47.61",
        "src-port": 53746,
        "dst-ip": "10.0.0.202",
        "dst-port": 22
      },
      {
        "packets": 3,
        "bytes": 180,
        "protocol": "tcp",
        "src-network": "10.0.0.24",
        "src-cidr": 32,
        "src-ip": "10.0.0.47",
        "src-port": 53745,
        "dst-ip": "192.168.0.2",
        "dst-port": 22
      },
      {
        "packets": 0,
        "bytes": 0,
        "protocol": "tcp",
        "src-network": "10.0.0.23",
        "src-cidr": 32,
        "src-ip": "10.0.0.47",
        "src-port": 53747,
        "dst-ip": "192.168.0.2",
        "dst-port": 22
      }
    ]
  }
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages
  • firewallRules: structure
    • packets: number, the amount of packets processed by the firewall
    • bytes: number, the amount of bytes processed by the firewall
    • rules: array of structures
      • packets: number, the number of packets processed by the rule
      • bytes: number, the number of bytes processed by the rule
      • protocol: string, can either be for example "tcp" or "udp"
      • src-network: string, the rule will only be applied to this source network
      • src-cidr: number, the CIDR of the source network
      • src-ip: string, the IP address that will be translated from
      • src-port: number, the port that will be translated from
      • dst-ip: string, the IP address that will be translated to
      • dst-port: number, the port that will be translated to

UpdateGeoBlock

Update GoeBlocking information

Request:

{
  "command": "UpdateGeoBlock",
  "setBlocking": true,
  "setAllow": true,
  "allow": ["NO","SE","DK"],
  "blocking": ["RU","CN","KP"]
}

  • command: string, "UpdateGeoBlock"
  • token: string, required, must be a valid authentication token
  • reverseProxyId: number, required, the id of the reverseproxy site
  • id: number, required, the id of the product
  • setAllow: boolean, required, sets if allowed countries list should be active or not
  • allow: array, required, list of countries to allow, all others are blocked
  • blocking: array, required, list of countries to block
  • setBlocking: boolean, required, sets if blocked countries list should be active or not

Response:

{
  "success": true,
  "message": "GeoBlock is updated.",
  "messageId": 93
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

AddDomainRecord

Add domain record.

Request:

{
   "command":"AddDomainRecord",
   "token":"cebxfljqkzjyirqxvyxsbaxdq",
   "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, required, can be "A", "AAAA", "TXT", "MX", "CNAME", "SOA" and "SRV"
  • domain: string, required, the domain name
  • host: string, required, the subdomain, also supports giving the whole domain
  • value: string, required, the value of the domain record, what the value should be is determined by the record type
  • options: structure, required
    • ttl, required: number, time to live in seconds
    • service: string, the symbolic name of the desired service
    • protocol: string, can be "tcp", "udp" or "tls"
    • priority: number, 0 - 65535
    • weight: number, 0 - 65535
    • port: number, 0 - 65535

Response:

{
  "success": true,
  "message": "Record added.",
  "messageId": 57
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages

DeleteDatabaseUser

Deletes a user in the database

Request:

{
  "command": "DeleteDatabaseUser",
  "token": "ABC123",
  "id": 1,
  "databaseid": 1,
  "username": "testuser"
}

  • command: string, "DeleteDatabaseUser"
  • token: string, required, must be a valid authentication token
  • id: number, required, the id of the product
  • databaseid: number, required, the id of the database the user belongs to
  • username: string, required, the name of the user you want to delete

Response:

{
  "success": true,
  "message": "Databaseuser deleted.",
  "messageId": 102
}
  • success: boolean
  • message: string, if success is false, a description of the problem that occurred
  • messageId: number, ID used to lookup localized messages