Create a server

Connect a new server.

POST /servers

Parameters
name requiredStringName of the server
ipAddress requiredStringPublic IP Address of the server
provider optionalStringThe provider of server. E.g: Digital Ocean, Linode, Vultr, AWS, etc
HTTP Request
POST https://manage.runcloud.io/api/v2/servers
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "name": "My First Server",
    "ipAddress": "127.0.0.1",
    "provider": "Localhost"
}'
Response
{
    "id": 65,
    "name": "My First Server",
    "provider": "Localhost",
    "ipAddress": "127.0.0.1",
    "os": "Ubuntu",
    "osVersion": null,
    "connected": false,
    "online": false,
    "agentVersion": null,
    "phpCLIVersion": "php73rc",
    "softwareUpdate": false,
    "securityUpdate": true,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-06-20 18:10:23"
}

List servers

GET /servers

Query String Parameters
search optionalSearch string
HTTP Request
GET https://manage.runcloud.io/api/v2/servers
Request
curl --request GET \
  --url "https://manage.runcloud.io/api/v2/servers?page=1" \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
    "data": [
        {
            "id": 65,
            "name": "My First Server",
            "provider": "Localhost",
            "ipAddress": "127.0.0.1",
            "os": "Ubuntu",
            "osVersion": null,
            "connected": false,
            "online": false,
            "agentVersion": null,
            "phpCLIVersion": "php73rc",
            "softwareUpdate": false,
            "securityUpdate": true,
            "transferStatus": "AVAILABLE",
            "created_at": "2019-06-20 18:10:23"
        },
        {
            "id": 7,
            "name": "RunCloud 2 1604",
            "provider": "VMWare Fusion 10",
            "ipAddress": "192.168.43.210",
            "os": "Ubuntu",
            "osVersion": "xenial",
            "connected": true,
            "online": true,
            "agentVersion": "2.1.7-1+ubuntu16.04+2",
            "phpCLIVersion": "php56rc",
            "softwareUpdate": false,
            "securityUpdate": true,
            "transferStatus": "AVAILABLE",
            "created_at": "2019-01-16 02:03:14"
        }
    ],
    "meta": {
        "pagination": {
            "total": 2,
            "count": 2,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": {}
        }
    }
}

List shared servers

GET /servers/shared

Query string
search optionalSearch string
HTTP Request
GET https://manage.runcloud.io/api/v2/servers/shared
Request
curl --request GET \
  --url "https://manage.runcloud.io/api/v2/servers/shared?page=1" \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
    "data": [
        {
            "id": 55,
            "name": "Test 2",
            "provider": "DigitalOcean",
            "ipAddress": "1.1.1.2",
            "os": "Ubuntu",
            "osVersion": null,
            "connected": true,
            "online": false,
            "agentVersion": "2.1.7-1+ubuntu16.04+1",
            "phpCLIVersion": "php73rc",
            "softwareUpdate": false,
            "securityUpdate": true,
            "transferStatus": "AVAILABLE",
            "created_at": "2019-05-19 05:13:13"
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 16,
            "current_page": 1,
            "total_pages": 1,
            "links": {}
        }
    }
}

Server object

GET /servers/{id}

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{id}
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/65 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
    "id": 65,
    "name": "My First Server",
    "provider": "Localhost",
    "ipAddress": "127.0.0.1",
    "os": "Ubuntu",
    "osVersion": null,
    "connected": false,
    "online": false,
    "agentVersion": null,
    "phpCLIVersion": "php73rc",
    "softwareUpdate": false,
    "securityUpdate": true,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-06-20 18:10:23"
}

Installation Script

GET /servers/{id}/installationscript

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{id}/installationscript
Request
  curl --request GET \
    --url https://manage.runcloud.io/api/v2/servers/65/installationscript \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    --header 'accept: application/json' \
    --header 'content-type: application/json'
Response
{
    "script": "export DEBIAN_FRONTEND=noninteractive; echo 'Acquire::ForceIPv4 \"true\";' | tee /etc/apt/apt.conf.d/99force-ipv4; apt-get update; apt-get install curl netcat-openbsd -y; curl --silent --location https://manage.runcloud.io/scripts/installer/cix510RbawOVExZANlzgUqcU9E1561024841dzRy0jIa3F0d7ibg4J94xSl1yB0dDBy0IJrIYMkjX2lNfu8JOY8gWbGB4tMWUwsw/d5fUlLVNYMvhm3c7LXGnTFgYw6KzN1qHNMc3ibafsyRWWICkGZseQ6OFtzARZiULAYTRwf9maKraHdtBCgZWgiCNNZx9Tqx8HVTL2XVivy56kD4MrHImxJJujeGNQCIk | bash -; export DEBIAN_FRONTEND=newt"
}

Server Stats

GET /servers/{id}/stats

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{id}/stats
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/stats \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
    "stats": {
        "webApplication": 5,
        "database": 3,
        "cronJob": 1,
        "supervisor": 0
    },
    "geoRecord": {
        "country": "Singapore",
        "subdivision": "Unknown",
        "latitude": 1.2929,
        "longitude": 103.8547
    }
}

Hardware Info

GET /servers/{id}/hardwareinfo

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{id}/hardwareinfo
Request
curl --request GET \
    --url https://manage.runcloud.io/api/v2/servers/7/hardwareinfo \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    --header 'accept: application/json' \
    --header 'content-type: application/json'
Response
{
    "kernelVersion": "4.4.0-87-generic",
    "processorName": "Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz",
    "totalCPUCore": 2,
    "totalMemory": 0.9520301818847656,
    "freeMemory": 0.3449363708496094,
    "diskTotal": 9.376751616,
    "diskFree": 5.573582848,
    "loadAvg": 0,
    "uptime": "74h 54m 7s"
}

List available PHP version

GET /servers/{serverId}/php/version

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/php/version
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/php/version \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
["php55rc", "php56rc", "php70rc", "php71rc", "php72rc", "php73rc"]

Change PHP-CLI version

PATCH /servers/{serverId}/php/cli

Parameters
phpVersion requiredStringPHP version you want to use for the CLI of this server/td>
HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/php/cli
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/php/cli \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "phpVersion":  "php72rc"
}'
Response
{
    "id": 7,
    "name": "RunCloud Xenial Test",
    "provider": "VMWare Fusion 11",
    "ipAddress": "192.168.43.210",
    "os": "Ubuntu",
    "osVersion": "xenial",
    "connected": true,
    "online": true,
    "agentVersion": "2.1.7-1+ubuntu16.04+2",
    "phpCLIVersion": "php72rc",
    "softwareUpdate": false,
    "securityUpdate": true,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-01-16 02:03:14"
}

Update Meta Data

PATCH /servers/{id}/settings/meta

Parameters
name requiredStringName of the server
provider optionalStringName of the company that provides your server
HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{id}/settings/meta
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/settings/meta \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "name": "RunCloud Xenial Test",
    "provider": "VMWare Fusion 11"
}'
Response
{
    "id": 7,
    "name": "RunCloud Xenial Test",
    "provider": "VMWare Fusion 11",
    "ipAddress": "192.168.43.210",
    "os": "Ubuntu",
    "osVersion": "xenial",
    "connected": true,
    "online": true,
    "agentVersion": "2.1.7-1+ubuntu16.04+2",
    "phpCLIVersion": "php56rc",
    "softwareUpdate": false,
    "securityUpdate": true,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-01-16 02:03:14"
}

Get SSH configuration

GET /servers/{id}/settings/ssh

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{id}/settings/ssh
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/settings/ssh \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
    "passwordlessLogin": false,
    "useDns": false,
    "preventRootLogin": false
}

Update SSH configuration

PATCH /servers/{id}/settings/ssh

Parameters
passwordlessLogin requiredBooleanOnly allow SSH using SSH Key
useDns requiredBooleanCheck reverse DNS of connecting machine
preventRootLogin requiredBooleanDisable SSH login as “root”
HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{id}/settings/ssh
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/settings/ssh \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "passwordlessLogin": true,
    "useDns": false,
    "preventRootLogin": true
}'
Response
{
    "passwordlessLogin": true,
    "useDns": false,
    "preventRootLogin": true
}

Software update

PATCH /servers/{id}/settings/autoupdate

Parameters
softwareUpdate requiredBooleanEnable update for installed software
securityUpdate requiredBooleanEnable update for security package
HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{id}/settings/autoupdate
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/settings/autoupdate \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "softwareUpdate": false,
    "securityUpdate": true
}'
Response
{
    "id": 7,
    "name": "RunCloud Xenial Test",
    "provider": "VMWare Fusion 11",
    "ipAddress": "192.168.43.210",
    "os": "Ubuntu",
    "osVersion": "xenial",
    "connected": true,
    "online": true,
    "agentVersion": "2.1.7-1+ubuntu16.04+2",
    "phpCLIVersion": "php56rc",
    "softwareUpdate": false,
    "securityUpdate": true,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-01-16 02:03:14"
}

Delete server

Deletes existing server.

DELETE /servers/{id}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/65
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/65 \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  -u YOUR_API_KEY:YOUR_API_SECRET
Response
{
    "id": 65,
    "name": "My First Server",
    "provider": "Localhost",
    "ipAddress": "127.0.0.1",
    "os": "Ubuntu",
    "osVersion": null,
    "connected": false,
    "online": false,
    "agentVersion": null,
    "transferStatus": "AVAILABLE",
    "created_at": "2019-06-20 10:00:41"
}