API Documentation

A documentation for developer

Servers

POST Create server

Connect a new server.

HTTP Request

POST https://manage.runcloud.io/base-api/servers

Arguments

Parameters Required Description
serverName YES Name of the server
ipAddress YES Public IP Address of the server
serverProvider NO The provider of server. E.g: Digital Ocean, Linode, Vultr, AWS, etc

Request

curl -X POST "https://manage.runcloud.io/base-api/servers" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "serverName": "My First Server",
        "ipAddress": "1.1.1.1",
        "serverProvider": "Custom Server Sdn. Bhd."
    }'

Response

{
    "redirect": "\/servers\/M9ZpajdlbW8z\/notconnected",
    "server": {
            "id": "M9ZpajdlbW8z",
            "user_id": "g704AY0lmNo6",
            "serverId": "NzoeztKvoRV8dYozQWHH7aI8Yu1518399464lSR9oRPQFVv4aJT4ujzNOu7hpINp3kG7RZLDRupBRbQMiYCgwwTLgfDPzYa4AVFj",
            "serverName": "My First Server",
            "ipAddress": "1.1.1.2",
            "serverProvider": "Custom Server Sdn. Bhd.",
            "connected": false,
            "online": false,
            "created_at": "2018-02-14 12:32:23",
            "created_at_humanize": "1 second ago",
            "_links": {
                "installationURL": {
                    "method": "get",
                    "link": "https:\/\/manage.runcloud.io\/script\/installer\/NzoeztKvoRV8dYozQWHH7aI8Yu1518399464lSR9oRPQFVv4aJT4ujzNOu7hpINp3kG7RZLDRupBRbQMiYCgwwTLgfDPzYa4AVFj\/lNBqxUv1mwz8VIbjrYV4AHZFUuiAJrDuh7paeoEsAEOG76VhX8tcyo0wHWkTbY3k2Tm9Ty4H8Qwgq7Lefvf11xbXZ7n4Guy80stCHf3KCX7559sbzaU9WA9OAll8zPQn"
                },
                "delete": {
                    "method": "delete",
                    "link": "\/api\/servers\/M9ZpajdlbW8z"
                }
            }
        }
}

GET List servers

HTTP Request

GET https://manage.runcloud.io/base-api/servers

Arguments

Parameters Required Description
page NO Page number
search NO Search string

Request

curl -X GET "https://manage.runcloud.io/base-api/servers?page=1" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

Response

{
    "data": [
        {
            "id": "yO4VAbX2BkNz",
            "user_id": "g704AY0lmNo6",
            "serverId": "lIUjIDi9Dhu06FSlHM76HqJh301482879529PlbpiqZLk1sORFf1E8BHaiLcIbX3qcKb1oOse5oh3oSfjqqLXs8N6ZwOHzBH6lKO",
            "serverName": "ARunCloudDev",
            "ipAddress": "192.168.43.201",
            "serverProvider": "VirtualBox",
            "connected": true,
            "online": true,
            "created_at": "2016-12-28 06:58:49",
            "created_at_humanize": "1 year ago",
            "_links": {
                "installationURL": {
                    "method": "get",
                    "link": "https:\/\/manage.runcloud.io\/script\/installer\/lIUjIDi9Dhu06FSlHM76HqJh301482879529PlbpiqZLk1sORFf1E8BHaiLcIbX3qcKb1oOse5oh3oSfjqqLXs8N6ZwOHzBH6lKO\/4N1abwP3RBzVdZ3o8gUBdtQFk93EUHwLlyn0GPQnyQnU6PKsxRYYzXkBhFa8B58UtL3sDA97Cvby1NNEcKI2qxmG1QBvDEfyRbkJENQgjJ0mujHRylBph997nK7FaXUD"
                },
                "delete": {
                    "method": "delete",
                    "link": "\/api\/servers\/yO4VAbX2BkNz"
                }
            },
            "agentVersion": "2.0.8-0ubuntu1",
            "phpVersion": "php72rc",
            "autoUpdate": false,
            "autoUpdateSecurity": true,
            "transferStatus": "AVAILABLE",
            "_extra": {
                "supervisord": {
                    "vendor": {
                        "\/RunCloud\/Packages\/php55rc\/bin\/php": "\/RunCloud\/Packages\/php55rc\/bin\/php",
                        "\/RunCloud\/Packages\/php56rc\/bin\/php": "\/RunCloud\/Packages\/php56rc\/bin\/php",
                        "\/RunCloud\/Packages\/php70rc\/bin\/php": "\/RunCloud\/Packages\/php70rc\/bin\/php",
                        "\/RunCloud\/Packages\/php71rc\/bin\/php": "\/RunCloud\/Packages\/php71rc\/bin\/php",
                        "\/RunCloud\/Packages\/php72rc\/bin\/php": "\/RunCloud\/Packages\/php72rc\/bin\/php",
                        "\/usr\/bin\/node": "\/usr\/bin\/node"
                    }
                },
                "cronjobs": {
                    "vendor": {
                        "": "",
                        "\/bin\/bash": "\/bin\/bash",
                        "\/RunCloud\/Packages\/php55rc\/bin\/php": "\/RunCloud\/Packages\/php55rc\/bin\/php",
                        "\/RunCloud\/Packages\/php56rc\/bin\/php": "\/RunCloud\/Packages\/php56rc\/bin\/php",
                        "\/RunCloud\/Packages\/php70rc\/bin\/php": "\/RunCloud\/Packages\/php70rc\/bin\/php",
                        "\/RunCloud\/Packages\/php71rc\/bin\/php": "\/RunCloud\/Packages\/php71rc\/bin\/php",
                        "\/RunCloud\/Packages\/php72rc\/bin\/php": "\/RunCloud\/Packages\/php72rc\/bin\/php",
                        "\/usr\/bin\/node": "\/usr\/bin\/node"
                    },
                    "predefinedSettings": {
                        "* * * * *": "Every Minutes",
                        "*\/10 * * * *": "Every 10 Minutes",
                        "*\/30 * * * *": "Every 30 Minutes",
                        "0 * * * *": "Every Hours",
                        "0 0 * * *": "At midnight",
                        "0 0 *\/10 * *": "Every 10 days at midnight",
                        "0 0 5 *\/4 *": "Every four month at 5th day at midnight",
                        "0 0 * * 0": "Every Sunday at midnight"
                    }
                },
                "php": {
                    "versions": {
                        "php55rc": "PHP 5.5",
                        "php56rc": "PHP 5.6",
                        "php70rc": "PHP 7.0",
                        "php71rc": "PHP 7.1",
                        "php72rc": "PHP 7.2"
                    }
                },
                "ssh": {
                    "passwordlessLogin": false,
                    "useDns": false,
                    "preventRootLogin": false
                }
            },
            "latestHealth": {
                "usedMemory": 638.99,
                "totalMemory": 992.1,
                "usedDiskSpace": 4138.03,
                "totalDiskSpace": 7262.95,
                "loadAverage": "0.0000000000"
            }
        },
        {
            "id": "M9ZpajdlbW8z",
            "serverId": "NzoeztKvoRV8dYozQWHH7aI8Yu1518399464lSR9oRPQFVv4aJT4ujzNOu7hpINp3kG7RZLDRupBRbQMiYCgwwTLgfDPzYa4AVFj",
            "serverName": "My First Server",
            "ipAddress": "1.1.1.2",
            "serverProvider": "Custom Server Sdn. Bhd.",
            "connected": false,
            "online": false,
            "created_at": "2018-02-12 09:37:44",
            "created_at_humanize": "22 minutes ago",
            "_links": {
                "installationURL": {
                    "method": "get",
                    "link": "https:\/\/manage.runcloud.io\/script\/installer\/NzoeztKvoRV8dYozQWHH7aI8Yu1518399464lSR9oRPQFVv4aJT4ujzNOu7hpINp3kG7RZLDRupBRbQMiYCgwwTLgfDPzYa4AVFj\/lNBqxUv1mwz8VIbjrYV4AHZFUuiAJrDuh7paeoEsAEOG76VhX8tcyo0wHWkTbY3k2Tm9Ty4H8Qwgq7Lefvf11xbXZ7n4Guy80stCHf3KCX7559sbzaU9WA9OAll8zPQn"
                },
                "delete": {
                    "method": "delete",
                    "link": "\/api\/servers\/M9ZpajdlbW8z"
                }
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 2,
            "count": 2,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

GET Server object

HTTP Request

GET https://manage.runcloud.io/base-api/servers/<server.id>

Request

curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

Response

{
    "id": "yO4VAbX2BkNz",
    "user_id": "g704AY0lmNo6",
    "serverId": "lIUjIDi9Dhu06FSlHM76HqJh301482879529PlbpiqZLk1sORFf1E8BHaiLcIbX3qcKb1oOse5oh3oSfjqqLXs8N6ZwOHzBH6lKO",
    "serverName": "ARunCloudDev",
    "ipAddress": "192.168.43.201",
    "serverProvider": "VirtualBox",
    "connected": true,
    "online": true,
    "created_at": "2016-12-28 06:58:49",
    "created_at_humanize": "1 year ago",
    "_links": {
        "installationURL": {
            "method": "get",
            "link": "https:\/\/manage.runcloud.io\/script\/installer\/lIUjIDi9Dhu06FSlHM76HqJh301482879529PlbpiqZLk1sORFf1E8BHaiLcIbX3qcKb1oOse5oh3oSfjqqLXs8N6ZwOHzBH6lKO\/4N1abwP3RBzVdZ3o8gUBdtQFk93EUHwLlyn0GPQnyQnU6PKsxRYYzXkBhFa8B58UtL3sDA97Cvby1NNEcKI2qxmG1QBvDEfyRbkJENQgjJ0mujHRylBph997nK7FaXUD"
        },
        "delete": {
            "method": "delete",
            "link": "\/api\/servers\/yO4VAbX2BkNz"
        }
    },
    "agentVersion": "2.0.8-0ubuntu1",
    "phpVersion": "php72rc",
    "autoUpdate": false,
    "autoUpdateSecurity": true,
    "transferStatus": "AVAILABLE",
    "_extra": {
        "supervisord": {
            "vendor": {
                "\/RunCloud\/Packages\/php55rc\/bin\/php": "\/RunCloud\/Packages\/php55rc\/bin\/php",
                "\/RunCloud\/Packages\/php56rc\/bin\/php": "\/RunCloud\/Packages\/php56rc\/bin\/php",
                "\/RunCloud\/Packages\/php70rc\/bin\/php": "\/RunCloud\/Packages\/php70rc\/bin\/php",
                "\/RunCloud\/Packages\/php71rc\/bin\/php": "\/RunCloud\/Packages\/php71rc\/bin\/php",
                "\/RunCloud\/Packages\/php72rc\/bin\/php": "\/RunCloud\/Packages\/php72rc\/bin\/php",
                "\/usr\/bin\/node": "\/usr\/bin\/node"
            }
        },
        "cronjobs": {
            "vendor": {
                "": "",
                "\/bin\/bash": "\/bin\/bash",
                "\/RunCloud\/Packages\/php55rc\/bin\/php": "\/RunCloud\/Packages\/php55rc\/bin\/php",
                "\/RunCloud\/Packages\/php56rc\/bin\/php": "\/RunCloud\/Packages\/php56rc\/bin\/php",
                "\/RunCloud\/Packages\/php70rc\/bin\/php": "\/RunCloud\/Packages\/php70rc\/bin\/php",
                "\/RunCloud\/Packages\/php71rc\/bin\/php": "\/RunCloud\/Packages\/php71rc\/bin\/php",
                "\/RunCloud\/Packages\/php72rc\/bin\/php": "\/RunCloud\/Packages\/php72rc\/bin\/php",
                "\/usr\/bin\/node": "\/usr\/bin\/node"
            },
            "predefinedSettings": {
                "* * * * *": "Every Minutes",
                "*\/10 * * * *": "Every 10 Minutes",
                "*\/30 * * * *": "Every 30 Minutes",
                "0 * * * *": "Every Hours",
                "0 0 * * *": "At midnight",
                "0 0 *\/10 * *": "Every 10 days at midnight",
                "0 0 5 *\/4 *": "Every four month at 5th day at midnight",
                "0 0 * * 0": "Every Sunday at midnight"
            }
        },
        "php": {
            "versions": {
                "php55rc": "PHP 5.5",
                "php56rc": "PHP 5.6",
                "php70rc": "PHP 7.0",
                "php71rc": "PHP 7.1",
                "php72rc": "PHP 7.2"
            }
        },
        "ssh": {
            "passwordlessLogin": false,
            "useDns": false,
            "preventRootLogin": false
        }
    }
}

DELETE Delete server

Deletes existing server.

HTTP Request

DELETE https://manage.runcloud.io/base-api/servers/<server.id>

Arguments

Parameters Required Description
typeYes If server is online You need to send "YES" string
certifyToDeleteServer If server is online You need to send "true" string
proceedToDeletion If server is online You need to send "true" string
lastWarning If server is online You need to send "true" string

Request

curl -X DELETE "https://manage.runcloud.io/base-api/servers/M9ZpajdlbW8z" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "typeYes": "YES",
        "certifyToDeleteServer": "true",
        "proceedToDeletion": "true",
        "lastWarning": "true"
    }'

Response

{
    "message": "Successfully deleted server My First Server",
    "redirect": "\/servers"
}