Deprecation Notice - RunCloud API Beta is deprecated effective 31 May 2019. New API will be released and it's not backward compatible.

Web Application

Create web application

Arguments
webApplicationNameyesName of the Web Application
domainNameyesDomain name for the Web Application
useryesThe System User who will own this Web Application. You need to use the username. E.g: runcloud
publicPathoptionalAppend a public path to a Web Application. If not defined, Web Application root path will be used as publicPath
phpVersionyesYou can get this from server._extra.php.versions
stackyes"hybrid", "nativenginx", or "customnginx"
stackModeyes"production" or "development"
clickjackingProtectionyesBoolean true or false
xssProtectionyesBoolean true or false
mimeSniffingProtectionyesBoolean true or false
processManageryes"dynamic", "ondemand", or "static"
processManagerStartServersYES if processManager is "dynamic"Must be integer
processManagerMinSpareServersYES if processManager is "dynamic"Must be integer
processManagerMaxSpareServersYES if processManager is "dynamic"Must be integer
processManagerMaxChildrenyesMust be integer
processManagerMaxRequestsyesMust be integer
openBasediroptionalIf you left this empty, open_basedir will be empty. To add a default value, use "/home/<systemuser.username>/webapps/<webApp.name>:/var/lib/php/session:/tmp"
timezoneyesYou can get this from Static Data for Timezone
disableFunctionsoptionalIf you left this empty, no php functions will be disabled. If you wanted to supply the default value, see the request example
maxExecutionTimeyesInteger. Use 0 for unlimited
maxInputTimeyesInteger. Use 0 for unlimited
maxInputVarsyesInteger. Use 0 for unlimited
memoryLimityesInteger. Supplied value is in MB.
postMaxSizeyesInteger. Supplied value is in MB. Use 0 for unlimited
uploadMaxFilesizeyesInteger. Supplied value is in MB. Use 0 for unlimited
sessionGcMaxlifetimeyesInteger. Supplied value is in seconds
allowUrlFopenyesBoolean true or false

POST /servers/<server.id>/webapps

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "webApplicationName": "myfirstwebapp",
        "domainName": "example.com",
        "user": "runcloud",
        "publicPath": "/public",
        "phpVersion": "php72rc",
        "stack": "nativenginx",
        "stackMode": "production",
        "clickjackingProtection": true,
        "xssProtection": true,
        "mimeSniffingProtection": true,
        "processManager": "ondemand",
        "processManagerMaxChildren": 50,
        "processManagerMaxRequests": 500,
        "openBasedir": "/home/runcloud/webapps/myfirstwebapp:/var/lib/php/session:/tmp",
        "timezone": "Asia/Kuala_Lumpur",
        "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abord,shell_exec,dl,set_time_limit,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server",
        "maxExecutionTime": 30,
        "maxInputTime": 60,
        "maxInputVars": 1000,
        "memoryLimit": 256,
        "postMaxSize": 256,
        "uploadMaxFilesize": 256,
        "sessionGcMaxlifetime": 1440,
        "allowUrlFopen": true
    }'
Response
{
	"message": "Succesfully added new Web Application myfirstwebapp.",
	"redirect": "/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/show"
}

List web applications

Arguments
pageoptionalPage number of the resources
searchoptionalSearching string if you wanted to search from list of Web Apps

GET /servers/<server.id>/webapps

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps?page=1" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"data": [
		{
			"id": "bZ0Ka4eK2PGR",
			"server_user_id": "LR6YA0XA71P8",
			"server_user_username": "runcloud",
			"name": "myfirstwebapp",
			"rootPath": "/home/runcloud/webapps/myfirstwebapp",
			"publicPath": "/home/runcloud/webapps/myfirstwebapp/public",
			"phpVersion": "php72rc",
			"stack": "nativenginx",
			"stack_humanize": "Native NGINX (You won't be able to use .htaccess but it is faster)",
			"stackMode": "production",
			"defaultServer": false,
			"restorationStatus": "IDLE",
			"created_at": "2018-03-01 16:41:58",
			"created_at_humanize": "3 minutes ago",
			"updated_at": "2018-03-01 16:41:58",
			"updated_at_humanize": "3 minutes ago",
			"_links": {
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR"
				},
				"setasdefault": {
					"method": "post",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default"
				},
				"removeasdefault": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default"
				},
				"rebuild": {
					"method": "patch",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/rebuild"
				}
			},
			"domains": [
				{
					"id": "LR6YA0XgA71P",
					"name": "example.com",
					"_links": {
						"delete": {
							"method": "delete",
							"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domains/LR6YA0XgA71P"
						}
					}
				}
			]
		}
	],
	"meta": {
		"pagination": {
			"total": 1,
			"count": 1,
			"per_page": 20,
			"current_page": 1,
			"total_pages": 1,
			"links": []
		}
	}
}

Web application object

GET /servers/<server.id>/webapps/<webApp.id>

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"id": "bZ0Ka4eK2PGR",
	"server_user_id": "LR6YA0XA71P8",
	"server_user_username": "runcloud",
	"name": "myfirstwebapp",
	"rootPath": "/home/runcloud/webapps/myfirstwebapp",
	"publicPath": "/home/runcloud/webapps/myfirstwebapp/public",
	"phpVersion": "php72rc",
	"stack": "nativenginx",
	"stackMode": "production",
	"stack_humanize": "Native NGINX (You won't be able to use .htaccess but it is faster)",
	"defaultServer": false,
	"restorationStatus": "IDLE",
	"created_at": "2018-03-01 16:41:58",
	"created_at_humanize": "18 minutes ago",
	"updated_at": "2018-03-01 16:41:58",
	"updated_at_humanize": "18 minutes ago",
	"_links": {
		"delete": {
			"method": "delete",
			"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR"
		},
		"setasdefault": {
			"method": "post",
			"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default"
		},
		"removeasdefault": {
			"method": "delete",
			"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default"
		},
		"rebuild": {
			"method": "patch",
			"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/rebuild"
		}
	}
}

Set as default

POST /servers/<server.id>/webapps/<webApp.id>/default

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/default
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Successfully set Web Application myfirstwebapp as default Web Application."
}

Remove from default

DELETE /servers/<server.id>/webapps/<webApp.id>/default

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/default
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/default" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Successfully remove default Web Application. Any access to your server via IP Address will be displaying 404 page."
}

Rebuild web application

PATCH /servers/<server.id>/webapps/<webApp.id>/rebuild

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/rebuild
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/rebuild" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Your Web Application will be rebuilt shortly."
}

Delete web application

DELETE /servers/<server.id>/webapps/<webApp.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>
Arguments
webApplicationNameyesName of the web application
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "webApplicationName": "myfirstwebapp"
    }'
Response
{
	"message": "Succesfully deleted Web Application myfirstwebapp."
}

GIT - Cloning repository

Arguments
provideryes"custom", "bitbucket", "github", "gitlab"
repositoryyesMust use this format: <username>/<repository>
branchyesRepository branch to clone
gitUserYES if provider is "custom"Username of git server user
gitHostYES if provider is "custom"Hostname of your GIT server
The timeout for cloning your script is around TWO MINUTES

POST /servers/<server.id>/webapps/<webApp.id>/git

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "provider": "github",
        "repository": "coolcodemy/test",
        "branch": "master"
    }'
Response
{
	"message": "Successfully attached GIT repository to Web Application myfirstwebapp.",
	"git": {
		"id": "G9yX2vJ728kL",
		"provider": "github",
		"host": null,
		"user": null,
		"repository": "coolcodemy/test",
		"repositoryURL": "https://github.com/coolcodemy/test",
		"branch": "master",
		"webhookURL": "https://manage.runcloud.io/webhooks/git/DXtHZHB7fTUQ43Wu3AOuN8xb1519893718/14caxEQhgBwY1YHbg4mBCmbLiSFQVnEf",
		"autoDeploy": false,
		"deployScript": "",
		"created_at": "2018-03-01 20:55:28",
		"created_at_humanize": "0 seconds ago",
		"_links": {
			"changebranch": {
				"method": "patch",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/branch"
			},
			"updatescript": {
				"method": "patch",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script"
			},
			"manualdeploy": {
				"method": "put",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script"
			},
			"delete": {
				"method": "delete",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL"
			}
		},
		"webhookHistories": [],
		"webhookErrors": []
	}
}

GIT - Object

GET /servers/<server.id>/webapps/<webApp.id>/git

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"git": {
		"id": "G9yX2vJ728kL",
		"provider": "github",
		"host": null,
		"user": null,
		"repository": "coolcodemy/test",
		"repositoryURL": "https://github.com/coolcodemy/test",
		"branch": "master",
		"webhookURL": "https://manage.runcloud.io/webhooks/git/DXtHZHB7fTUQ43Wu3AOuN8xb1519893718/14caxEQhgBwY1YHbg4mBCmbLiSFQVnEf",
		"autoDeploy": false,
		"deployScript": "",
		"created_at": "2018-03-01 20:55:28",
		"created_at_humanize": "5 minutes ago",
		"_links": {
			"changebranch": {
				"method": "patch",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/branch"
			},
			"updatescript": {
				"method": "patch",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script"
			},
			"manualdeploy": {
				"method": "put",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script"
			},
			"delete": {
				"method": "delete",
				"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL"
			}
		},
		"webhookHistories": [],
		"webhookErrors": []
	},
	"hasScriptInstaller": false
}

GIT - Change branch

Arguments
branchyesAvailable GIT branch for your repository

PATCH /servers/<server.id>/webapps/<webApp.id>/git/<git.id>/branch

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git/<git.id>/branch
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/branch" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "branch": "development"
    }'
Response
{
	"message": "Successfully changed branch to development.",
	"resetForm": false
}

GIT - Customize deployment script

Arguments
autoDeployyesBoolean true or false to enable deployment script
deployScriptoptionalThe script that will be running when GIT Webhook URL got a hit

PATCH /servers/<server.id>/webapps/<webApp.id>/git/<git.id>/script

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git/<git.id>/script
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "autoDeploy": true,
        "deployScript": "git merge\nphp artisan view:clear"
    }'
Response
{
	"message": "Deployment script updated",
	"resetForm": false
}

GIT - Force deploy using deployment script

PUT /servers/<server.id>/webapps/<webApp.id>/git/<git.id>/script

HTTP Request
PUT https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git/<git.id>/script
Request
curl -X PUT "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL/script" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "The deployment script will be running inside your server shortly."
}

GIT - Delete

Arguments
repositoryyesThe repository of the attached GIT

DELETE /servers/<server.id>/webapps/<webApp.id>/git/<git.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/git/<git.id>
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/git/G9yX2vJ728kL" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "repository": "coolcodemy/test"
    }'
Response
{
	"message": "Successfully deleted GIT repository coolcodemy/test from your server."
}

Script Installer - Install

POST /servers/<server.id>/cronjobs

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/installer
Arguments
scriptNameyesYou can get this from Static Data for Available Script Installer
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/installer" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "scriptName": "wordpress"
    }'
Response
{
	"message": "Successfully triggered Wordpress installation. Your script will be ready in a few moments."
}

Script Installer - Object

GET /servers/<server.id>/webapps/<webApp.id>/installer

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/installer
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/installer" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"script": {
		"id": "4QEwaDWA791y",
		"name": "WordPress",
		"_links": {
			"delete": {
				"method": "delete",
				"link": "https://runcloud.dev/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/installer/4QEwaDWA791y"
			}
		}
	},
	"hasGit": false
}

Script Installer - Delete

Arguments
typeYesyesYou need to send "YES" string

DELETE /servers/<server.id>/webapps/<webApp.id>/installer/<installer.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/installer/<installer.id>
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/installer/4QEwaDWA791y" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "typeYes": "YES"
    }'
Response
{
	"message": "Successfully deleted wordpress from your Web Application."
}

Domain Name - Add

Arguments
domainNameyesThe domain name you would like to add

POST /servers/<server.id>/webapps/<webApp.id>/domainname

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/domainname
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domainname" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "domainName": "www.example.com"
    }'
Response
{
	"message": "Successfully added new domain www.example.com to Web Application myfirstwebapp."
}

Domain Name - List

POST /servers/<server.id>/webapps/<webApp.id>/domainname

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/domainname
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domainname" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"data": [
		{
			"id": "LR6YA0XgA71P",
			"name": "example.com",
			"_links": {
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domainname/LR6YA0XgA71P"
				}
			}
		},
		{
			"id": "QbyMAWZklEvL",
			"name": "www.example.com",
			"_links": {
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domainname/QbyMAWZklEvL"
				}
			}
		}
	]
}

Domain Name - Delete

DELETE /servers/<server.id>/webapps/<webApp.id>/domainname/<domain.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/domainname/<domain.id>
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/domainname/QbyMAWZklEvL" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Successfully removed domain www.example.com from Web Application myfirstwebapp."
}

SSL - Install

Arguments
provideryes"letsencrypt" or "custom"
enableHttpyesBoolean true or false
enableHstsyesBoolean true or false
http2yesBoolean true or false (Hardcoded to TRUE for now)
brotliyesBoolean true or false (Hardcoded to TRUE for now)
authorizationMethodYES if provider is "letsencrypt""http-01" or "dns-01"
externalApiYES if provider is "letsencrypt" and authorizationMethod is "dns-01"Id of the 3rd Party API to use
environmentYES if provider is "letsencrypt""live" or "staging" environment
privateKeyYES if provider is "custom"SSL Private Key
certificateYES if provider is "custom"SSL Certificate

POST /servers/<server.id>/webapps/<webApp.id>/ssl

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/ssl
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/ssl" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "provider": "custom",
        "enableHttp": false,
        "enableHsts": true,
        "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDem6F7HLVxStq/\n/t6aThEEntPgIjjgj1wL03hVTIHbDhzZ/hWh7KEo5nQCdL+HMJIGnpM/7htEVos0\nzkVT2QchP6p0p9PR1rY3+SVoxEcltJ9xug8EZ7Zut8F5VHjbNsTi7W0S3irj6MCg\nuVkSehE4PeV9P+zeXf+0Aa7KwDiQHI1krvqY9DQda4IGyPeZI3cFbzFBYHhUK5am\nLU3iSpwNdBPWsgxQNNtsFnfOvmhuxxZ8B55TKATAVZ6UDI4DR1ysyCsJv8bajWro\nCEIQ61dyJb+H5eyTrd86qN46mYgGLNdoClOhQ4QISoz8mhWzFf/oIUbiHzBpslvo\nrn+YPEvDAgMBAAECggEAXOcIqo+dra12w8ADeNRxx8LdW+IMaLOLz6euxbKLUzd9\nlQC0WIKf86jR66B7uljr6HVPsNOXb5rKt/wJ9OdTUW33nn3YKe/41j1VfnbD1pme\nHWFwGP+LpINt7EvzsFEYNDiwV7p+neUqVyljYhGtlBJI70+5dEg4ihBVuWolcQai\nH06XxdT72O41RKr/uSzKcuxZBQhdD9Y505UVMsHOjFu0HMUMZ/wk7msZg4nyYmfg\nW0h/LbzmzblbEzF+wd4PYTE5FC4SRiS1/E8aDe78Rg7ww7pxgW9OvGlMWv4lrfco\nBO430h+VBodQnHHaTj4lV59pYhQGvlHwkSDEHpuWAQKBgQD3Jh6sIY97kOCJ9oET\nlhsBZ6JICiqmsieWRuSmMoiErBezVZ9QS5C5GOL4GkPsc7Bw0s6RB+9TZsEPS3DH\nglpzr5a89d3BRlkSNFSSHeq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\n-----END CERTIFICATE-----"
    }'
Response
{
    "message": "Successfully added SSL\/TLS to Web Application myfirstwebapp.",
    "ssl": {
        "id": "rjJ8lrNl1pnb",
        "method": "custom",
        "method_humanize": "Custom",
        "enableHTTP": "No",
        "enableHSTS": "Yes",
        "validUntil": null,
        "renewal_date": null,
        "runcloudAcme": false,
        "authorizationMethod": null,
        "certificate": "-----BEGIN CERTIFICATE-----\nMIIDuDCCAqACCQC6DH7qQzl7LTANBgkqhkiG9w0BAQsFADCBnTELMAkGA1UEBhMC\nTVkxDjAMBgNVBAgMBUpvaG9yMQ8wDQYDVQQHDAZTa3VkYWkxGzAZBgNVBAoMElJ1\nbkNsb3VkIFNkbi4gQmhkLjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMM\nD3d3dy5leGFtcGxlLmNvbTEgMB4GCSqGSIb3DQEJARYRaGVsbG9AcnVuY2xvdWQu\naW8wHhcNMTgwMzAyMDMyNjI3WhcNMTkwMzAyMDMyNjI3WjCBnTELMAkGA1UEBhMC\nTVkxDjAMBgNVBAgMBUpvaG9yMQ8wDQYDVQQHDAZTa3VkYWkxGzAZBgNVBAoMElJ1\nbkNsb3VkIFNkbi4gQmhkLjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMM\nD3d3dy5leGFtcGxlLmNvbTEgMB4GCSqGSIb3DQEJARYRaGVsbG9AcnVuY2xvdWQu\naW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDem6F7HLVxStq\/\/t6a\nThEEntPgIjjgj1wL03hVTIHbDhzZ\/hWh7KEo5nQCdL+HMJIGnpM\/7htEVos0zkVT\n2QchP6p0p9PR1rY3+SVoxEcltJ9xug8EZ7Zut8F5VHjbNsTi7W0S3irj6MCguVkS\nehE4PeV9P+zeXf+0Aa7KwDiQHI1krvqY9DQda4IGyPeZI3cFbzFBYHhUK5amLU3i\nSpwNdBPWsgxQNNtsFnfOvmhuxxZ8B55TKATAVZ6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ePQAjgAyAYciXpE95YXQcYMM\nlXCUsdHQomIAwFN2TNWohQ==\n-----END PRIVATE KEY-----",
        "staging": false
        "_links": {
            "redeploy": {
                "method": "patch",
                "link": "\/api\/servers\/yO4VAbX2BkNz\/webapps\/bZ0Ka4eK2PGR\/ssl"
            },
            "delete": {
                "method": "delete",
                "link": "\/api\/servers\/yO4VAbX2BkNz\/webapps\/bZ0Ka4eK2PGR\/ssl\/rjJ8lrNl1pnb"
            }
        }
    }
}

SSL - Object

GET /servers/<server.id>/webapps/<webApp.id>/ssl

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/ssl
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/ssl" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
    "id": "rjJ8lrNl1pnb",
    "method": "custom",
    "method_humanize": "Custom",
    "enableHTTP": "No",
    "enableHSTS": "Yes",
    "validUntil": null,
    "renewal_date": null,
    "runcloudAcme": false,
    "authorizationMethod": null,
    "certificate": "-----BEGIN CERTIFICATE-----\nMIIDuDCCAqACCQC6DH7qQzl7LTANBgkqhkiG9w0BAQsFADCBnTELMAkGA1UEBhMC\nTVkxDjAMBgNVBAgMBUpvaG9yMQ8wDQYDVQQHDAZTa3VkYWkxGzAZBgNVBAoMElJ1\nbkNsb3VkIFNkbi4gQmhkLjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMM\nD3d3dy5leGFtcGxlLmNvbTEgMB4GCSqGSIb3DQEJARYRaGVsbG9AcnVuY2xvdWQu\naW8wHhcNMTgwMzAyMDMyNjI3WhcNMTkwMzAyMDMyNjI3WjCBnTELMAkGA1UEBhMC\nTVkxDjAMBgNVBAgMBUpvaG9yMQ8wDQYDVQQHDAZTa3VkYWkxGzAZBgNVBAoMElJ1\nbkNsb3VkIFNkbi4gQmhkLjEUMBIGA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7cjsUBTj0Fo5YYPeZzMyEaYKCBdIcjH6AAbQpTm5RA2\n4jlQiWRflAWczVRIRsoOzLcsrBQPhjB3jETXI73dc1+PcdmL4pi996BBAoGAEuob\n86srfJH9kK0VrB4NCAEWhOhI97bL6rcQuAIh8C8AGiHZiluEark3uJIY1w8thBj\/\nveJllE9ceVo8zyMV7oB04v5gtFANL4LsVWUcIYbilqGVBd4KmjK2H0j5CCaDUN3u\nY+oOnCzLEeakZDD52y8UkO7cQ3l0AanmzG7QAAECgYBVTTgYqAoUG6wVuQw5Jrnz\n9\/ItvU4zPKDadnoIRgMZq+wXo8f8dMSzNjlylv+vQF99E9NRMMIVbyeH4\/q5ANGl\nkcFwSyAhE7z+uSV0Ho6OqZVqis8e9rcin9+opC5BePQAjgAyAYciXpE95YXQcYMM\nlXCUsdHQomIAwFN2TNWohQ==\n-----END PRIVATE KEY-----",
    "staging": false
    "_links": {
        "redeploy": {
            "method": "patch",
            "link": "\/api\/servers\/yO4VAbX2BkNz\/webapps\/bZ0Ka4eK2PGR\/ssl"
        },
        "delete": {
            "method": "delete",
            "link": "\/api\/servers\/yO4VAbX2BkNz\/webapps\/bZ0Ka4eK2PGR\/ssl\/rjJ8lrNl1pnb"
        }
    }
}

SSL - Redeploy (Let's Encrypt only)

PATCH /servers/<server.id>/webapps/<webApp.id>/ssl

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/ssl
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/ssl" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Redeploying SSL/TLS to Web Application myfirstwebapp. Changes will happen shortly."
}

SSL - Update SSL Config

Arguments
enableHttpyesBoolean true or false
enableHstsyesBoolean true or false
privateKeyYES if provider is "custom"SSL Private Key
certificateYES if provider is "custom"SSL Certificate

PATCH /servers/<server.id>/webapps/<webApp.id>/ssl/<ssl.id>

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/ssl/<ssl.id>
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/ssl/rjJ8lrNl1pnb" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "enableHttp": false,
        "enableHsts": true,
        "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9FYQwWBmV9zCO\nhW4ws7G66xhF6a5L07DpIIqlufaK/W0tZ1Hm4HgZmaSzi9OAPxqSwmQmQlUcGACn\nm31urCayB+WZw9Dpx6mhWXsa8SXaziF/V/saC3uG4R79GGaeSqSEnpmc7kMBIu2a\nN5FpztsyZpzxHYUVv82pS5YLxBwIo/2gsXbzRKWXbSTml+yqwlMFcsur9M6q/w9q\nd0j108g/l5Ei37ttwfegdY9pocUh6IcNyN0Xx981xAtIG78L2+sux9acyDaju4D+\nw76aD/9U1u2c0fccvE7ssoaeZgjAE6fjk+uLZFhd+8sRWElT0u6A9CZdxSCDcVUz\nn/OCPzBXAgMBAAECggEBAKeumB7jUjVbFHWfwLtx8BCqgkkl1csq/X2QvUQBKbHS\n0upr8QcFU5yoU5ZiTvsxexhhSb1gH+gdJR9+Vfs6sco6FJSLQg7AYR9UokafSonD\nOZOb63QKcM6JgBjFdeO0oDd4CxRPe55bYkjcNJmXt2338AAnxKkoAnO7M2JV1OKX\nO9DzSWQWTjlD5xn1aD4yA/xYr3WxFK3ZjRrVc+43IuM4O8/G5Y/ys929rWHyPMVD\nOoHiTyvlOgTFmtJJ8mgjFwfoOC5QjLOinqIxizld0fsuURDna8rLuOdRcg4jJisb\npjPbkcYGio36lahq+PhuDYRSlKLFv8j/R2HDrRvI9iECgYEA8di+6nKksZq31vQ2\n2gvBtsqV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f3UL1nLoQy3j1B12gxY8YQAOiMGNqvi6aSnJV50A8Qhd\ntBAJ4JM9QNMP1en63max8GfnqBpiPIW14Xg/NxgeqsyY5U6g\n-----END CERTIFICATE-----"
    }'
Response
{
	"message": "Successfully updated SSL/TLS Certificate for Web Application myfirstwebapp.",
	"resetForm": false
}

SSL - Delete

DELETE /servers/<server.id>/webapps/<webApp.id>/ssl/<ssl.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/ssl/<ssl.id>
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/ssl/rjJ8lrNl1pnb" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"message": "Successfully removed SSL/TLS Certificate from Web Application myfirstwebapp."
}

Settings - Change PHP version

Arguments
phpVersionyesYou can get this from server._extra.php.versions

POST /servers/<server.id>/webapps/<webApp.id>/settings/phpversion

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/settings/phpversion
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/settings/phpversion" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "phpVersion": "php70rc"
    }'
Response
{
	"message": "Web Application myfirstwebapp will be updated to php70rc.",
	"resetForm": false
}

Settings - PHP-FPM, NGiNX

Arguments
stackyes"hybrid", "nativenginx" or "customnginx"
stackModeyes"production" or "development"
clickjackingProtectionyesBoolean true or false
xssProtectionyesBoolean true or false
mimeSniffingProtectionyesBoolean true or false
processManageryes"dynamic", "ondemand", or "static"
processManagerStartServersYES if processManager is "dynamic"Must be integer
processManagerMinSpareServersYES if processManager is "dynamic"Must be integer
processManagerMaxSpareServersYES if processManager is "dynamic"Must be integer
processManagerMaxChildrenyesMust be integer
processManagerMaxRequestsyesMust be integer
openBasediroptionalIf you left this empty, open_basedir will be empty. To add a default value, use "/home/<systemuser.username>/webapps/<webApp.name>:/var/lib/php/session:/tmp"
timezoneyesYou can get this from Static Data for Timezone
disableFunctionsoptionalIf you left this empty, no php functions will be disabled. If you wanted to supply the default value, see the request example
maxExecutionTimeyesInteger. Use 0 for unlimited
maxInputTimeyesInteger. Use 0 for unlimited
maxInputVarsyesInteger. Use 0 for unlimited
memoryLimityesInteger. Supplied value is in MB.
postMaxSizeyesInteger. Supplied value is in MB. Use 0 for unlimited
uploadMaxFilesizeyesInteger. Supplied value is in MB. Use 0 for unlimited
sessionGcMaxlifetimeyesInteger. Supplied value is in seconds
allowUrlFopenyesBoolean true or false

PATCH /servers/<server.id>/webapps/<webApp.id>/settings/phpfpmnginx

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/settings/phpfpmnginx
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/settings/phpfpmnginx" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "stack": "hybrid",
        "stackMode": "developement",
        "clickjackingProtection": true,
        "xssProtection": true,
        "mimeSniffingProtection": true,
        "processManager": "ondemand",
        "processManagerMaxChildren": 300,
        "processManagerMaxRequests": 300,
        "openBasedir": "/home/runcloud/webapps/myfirstwebapp:/var/lib/php/session:/tmp",
        "timezone": "Asia/Kuala_Lumpur",
        "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abord,shell_exec,dl,set_time_limit,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server",
        "maxExecutionTime": 60,
        "maxInputTime": 120,
        "maxInputVars": 1000,
        "memoryLimit": 512,
        "postMaxSize": 256,
        "uploadMaxFilesize": 256,
        "sessionGcMaxlifetime": 1440,
        "allowUrlFopen": true
    }'
Response
{
	"message": "Changes will reflected on Web Application myfirstwebapp in a few moments.",
	"resetForm": false
}

Log

Arguments
pageoptionalPage number of the Web App log resources
searchoptionalFilter log

POST /servers/<server.id>/webapps/<webApp.id>/log

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/webapps/<webApp.id>/log
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/webapps/bZ0Ka4eK2PGR/log?page=1" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"data": [
		{
			"id": "Nq02VLvJAE97",
			"type": "App\\WebApplication",
			"severity": 1,
			"log": "Update Web Application configuration",
			"created_at_date": "02 March 2018",
			"created_at_time": "3:54:28 PM",
			"created_at_humanize": "2 hours ago"
		},
		{
			"id": "Lx1AMzemaROP",
			"type": "App\\WebApplication",
			"severity": 1,
			"log": "Change PHP Version from php72rc to php70rc",
			"created_at_date": "02 March 2018",
			"created_at_time": "3:35:34 PM",
			"created_at_humanize": "3 hours ago"
		},
		{
			"id": "byMAWzvblEvL",
			"type": "App\\WebApplication",
			"severity": 3,
			"log": "Deleted SSL/TLS from Web Application",
			"created_at_date": "02 March 2018",
			"created_at_time": "3:17:30 PM",
			"created_at_humanize": "3 hours ago"
		}
	],
	"meta": {
		"pagination": {
			"total": 3,
			"count": 3,
			"per_page": 20,
			"current_page": 1,
			"total_pages": 1,
			"links": []
		}
	}
}