Web Application

Create web application

Parameters
namerequiredStringName of the Web Application
domainNamerequiredStringDomain name for the Web Application
userrequiredIntegerThe System User who will own this Web Application
publicPathoptionalStringAppend a public path to a Web Application. If not defined, Web Application root path will be used as publicPath
phpVersionrequiredStringRefer to Server section on how to get list of PHP version supported
stackrequiredString"hybrid", "nativenginx", or "customnginx"
stackModerequiredString"production" or "development"
clickjackingProtectionrequiredBoolean
xssProtectionrequiredBoolean
mimeSniffingProtectionrequiredBoolean
processManagerrequiredString"dynamic", "ondemand", or "static"
processManagerStartServersrequired if processManager is "dynamic"Integer
processManagerMinSpareServersrequired if processManager is "dynamic"Integer
processManagerMaxSpareServersrequired if processManager is "dynamic"Integer
processManagerMaxChildrenrequiredInteger
processManagerMaxRequestsrequiredInteger
openBasediroptionalStringIf 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"
timezonerequiredStringYou can get this from Static Data for Timezone
disableFunctionsoptionalStringIf you left this empty, no php functions will be disabled. If you wanted to supply the default value, see the request example
maxExecutionTimerequiredIntegerUse 0 for unlimited
maxInputTimerequiredIntegerUse 0 for unlimited
maxInputVarsrequiredIntegerUse 0 for unlimited
memoryLimitrequiredIntegerSupplied value is in MB.
postMaxSizerequiredIntegerSupplied value is in MB. Use 0 for unlimited
uploadMaxFilesizerequiredIntegerSupplied value is in MB. Use 0 for unlimited
sessionGcMaxlifetimerequiredIntegerSupplied value is in seconds
allowUrlFopenrequiredBoolean

POST /servers/{serverId}/webapps/custom

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/custom
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/custom \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "name": "testing",
  "domainName": "testing.com",
  "user": 142,
  "publicPath": null,
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "clickjackingProtection": true,
  "xssProtection": true,
  "mimeSniffingProtection": true,
  "processManager": "ondemand",
  "processManagerMaxChildren": 50,
  "processManagerMaxRequests": 500,
  "openBasedir": "/home/myuser/webapps/testing:/var/lib/php/session:/tmp",
  "timezone": "UTC",
  "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,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
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

List web applications

Query String Parameters
searchoptionalSearching string if you wanted to search from list of Web Apps

GET /servers/{serverId}/webapps

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "data": [
    ...
    ...
    ...
    {
      "id": 109,
      "server_user_id": 142,
      "name": "testing",
      "rootPath": "\/home\/myuser\/webapps\/testing",
      "publicPath": "\/home\/myuser\/webapps\/testing",
      "phpVersion": "php73rc",
      "stack": "hybrid",
      "stackMode": "production",
      "type": "custom",
      "defaultApp": false,
      "alias": null,
      "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
      "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
      "created_at": "2019-06-28 19:07:50"
    }
  ],
  "meta": {
    "pagination": {
      "total": 6,
      "count": 6,
      "per_page": 15,
      "current_page": 1,
      "total_pages": 1,
      "links": {}
    }
  }
}

Web application object

GET /servers/{serverId}/webapps/{webAppId}

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

Set as default

POST /servers/{serverId}/webapps/{webAppId}/default

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/default
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/default \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": true,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

Remove from default

The return value will get defaultApp = true. You need to GET the web application object to get the newest defaultApp value. The value will only change to false when our server has successfully contacted your server.

DELETE /servers/{serverId}/webapps/{webAppId}/default

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/default
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/default \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": true,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

Rebuild web application

PATCH /servers/{serverId}/webapps/{webAppId}/rebuild

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/rebuild
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/rebuild \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php73rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

Cloning GIT repository

Parameters
providerrequiredString"custom", "bitbucket", "github", "gitlab", "selfhostedgitlab"
repositoryrequiredStringMust use this format: <username>/<repository>
branchrequiredStringRepository branch to clone
gitUserrequired if provider is "custom" or "selfhostedgitlab"StringUsername of git server user
gitHostrequired if provider is "custom" or "selfhostedgitlab"StringHostname of your GIT server
The timeout for cloning your script is around TWO MINUTES
You can construct Webhook URL using this template: https://manage.runcloud.io/webhooks/git/{webApp.pullKey1}/{webApp.pullKey2}.
For example, https://manage.runcloud.io/webhooks/git/jwMZwtXP3ItQRKKoMSZboAXr1561748870/zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu

POST /servers/{serverId}/webapps/{webAppId}/git

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "provider": "github",
  "repository": "coolcodemy/test",
  "branch": "master"
}'
Response
{
  "id": 37,
  "provider": "github",
  "gitHost": null,
  "gitUser": null,
  "branch": "master",
  "repositoryData": {
    "url": "https:\/\/github.com\/coolcodemy\/test",
    "repo": "[email protected]:coolcodemy\/test.git"
  },
  "atomic": false,
  "atomic_project_id": null,
  "autoDeploy": false,
  "deployScript": null,
  "created_at": "2019-06-29 03:36:36"
}

GIT Object

GET /servers/{serverId}/webapps/{webAppId}/git

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 37,
  "provider": "github",
  "gitHost": null,
  "gitUser": null,
  "branch": "master",
  "repositoryData": {
    "url": "https:\/\/github.com\/coolcodemy\/test",
    "repo": "[email protected]:coolcodemy\/test.git"
  },
  "atomic": false,
  "atomic_project_id": null,
  "autoDeploy": false,
  "deployScript": null,
  "created_at": "2019-06-29 03:36:36"
}

Change GIT branch

Parameters
branchrequiredStringAvailable GIT branch for your repository

PATCH /servers/{serverId}/webapps/{webAppId}/git/{gitId}/branch

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git/{gitId}/branch
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git/37/branch \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "branch": "dev"
}'
Response
{
  "id": 37,
  "provider": "github",
  "gitHost": null,
  "gitUser": null,
  "branch": "dev",
  "repositoryData": {
    "url": "https:\/\/github.com\/coolcodemy\/test",
    "repo": "[email protected]:coolcodemy\/test.git"
  },
  "atomic": false,
  "atomic_project_id": null,
  "autoDeploy": false,
  "deployScript": null,
  "created_at": "2019-06-29 03:36:36"
}

Customize GIT deployment script

Parameters
autoDeployrequiredBooleanEnable deployment script
deployScriptoptionalStringThe script that will be running when GIT Webhook URL got a hit

PATCH /servers/{serverId}/webapps/{webAppId}/git/{gitId}/script

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git/{gitId}/script
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git/37/script \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "autoDeploy": true,
  "deployScript": "git merge\nphp artisan migrate"
}'
Response
{
  "id": 37,
  "provider": "github",
  "gitHost": null,
  "gitUser": null,
  "branch": "dev",
  "repositoryData": {
    "url": "https:\/\/github.com\/coolcodemy\/test",
    "repo": "[email protected]:coolcodemy\/test.git"
  },
  "atomic": false,
  "atomic_project_id": null,
  "autoDeploy": true,
  "deployScript": "git merge\nphp artisan migrate",
  "created_at": "2019-06-29 03:36:36"
}

Force deployment using deployment script

PUT /servers/{serverId}/webapps/{webAppId}/git/{gitId}/script

HTTP Request
PUT https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git/{gitId}/script
Request
curl --request PUT \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git/37/script \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Remove GIT repository

DELETE /servers/{serverId}/webapps/{webAppId}/git/{gitId}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/git/{gitId}
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/git/37 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 37,
  "provider": "github",
  "gitHost": null,
  "gitUser": null,
  "branch": "dev",
  "repositoryData": {
    "url": "https:\/\/github.com\/coolcodemy\/test",
    "repo": "[email protected]:coolcodemy\/test.git"
  },
  "atomic": false,
  "atomic_project_id": null,
  "autoDeploy": true,
  "deployScript": "git merge\nphp artisan migrate",
  "created_at": "2019-06-29 03:36:36"
}

Install PHP Script

Parameters
namerequiredStringAvailable options: "concrete5", "drupal", "grav", "gravadmin", "joomla", "myBB", "phpBB", "phpMyAdmin", "piwik", "prestaShop", "wordpress"

POST /servers/{serverId}/webapps/{webAppId}/installer

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/installer
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/installer \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "name": "wordpress"
}'
Response
{
  "id": 2,
  "name": "wordpress",
  "realName": "WordPress",
  "created_at": "2019-06-29 15:22:57"
}

PHP Script object

GET /servers/{serverId}/webapps/{webAppId}/installer

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/installer
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/installer \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 2,
  "name": "wordpress",
  "realName": "WordPress",
  "created_at": "2019-06-29 15:22:57"
}

Remove PHP Script

DELETE /servers/{serverId}/webapps/{webAppId}/installer/{installerId}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/installer/{installerId}
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/installer/2 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 2,
  "name": "wordpress",
  "realName": "WordPress",
  "created_at": "2019-06-29 15:22:57"
}

Add Domain Name

Parameters
namerequiredStringThe domain name you would like to add

POST /servers/{serverId}/webapps/{webAppId}/domains

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/domains
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/domains \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "name": "*.testing.com"
}'
Response
{
  "id": 128,
  "name": "*.testing.com",
  "created_at": "2019-06-30 06:13:29"
}

List Domain Names

GET /servers/{serverId}/webapps/{webAppId}/domains

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/domains
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/domains \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "data": [
    {
      "id": 128,
      "name": "*.testing.com",
      "created_at": "2019-06-30 06:13:29"
    },
    {
      "id": 126,
      "name": "testing.com",
      "created_at": "2019-06-28 19:07:50"
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 1,
      "links": {}
    }
  }
}

Domain Name Object

GET /servers/{serverId}/webapps/{webAppId}/domains/{domainId}

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/domains/{domainId}
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/domains/128 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 128,
  "name": "*.testing.com",
  "created_at": "2019-06-30 06:13:29"
}

Delete Domain Name

DELETE /servers/{serverId}/webapps/{webAppId}/domains/{domainId}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/domains/{domainId}
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/domains/128 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 128,
  "name": "*.testing.com",
  "created_at": "2019-06-30 06:13:29"
}

Install SSL

Parameters
providerrequiredString"letsencrypt" or "custom"
enableHttprequiredBoolean
enableHstsrequiredBoolean
ssl_protocol_idOPTIONALIntegerSSL Protocol. You can get this value from Static Data API. It will use latest possible value if not supplied.
authorizationMethodrequired if provider is "letsencrypt"String"http-01" or "dns-01"
externalApirequired if provider is "letsencrypt" and authorizationMethod is "dns-01"IntegerId of the 3rd Party API to use.
environmentrequired if provider is "letsencrypt"String"live" or "staging" environment
privateKeyrequired if provider is "custom"RSA Private Key StringSSL Private Key
certificaterequired if provider is "custom"RSA Public Key StringSSL Certificate

POST /servers/{serverId}/webapps/{webAppId}/ssl

HTTP Request
POST https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/ssl
Request
curl --request POST \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/ssl \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
    "provider": "custom",
    "enableHttp": false,
    "enableHsts": true,
    "ssl_protocol_id": 3,
    "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/E8aDe78Rg7ww7pxgW9OvGlMWv4lrf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jB1Rapi0H0TpgAtiHCNYcgmFL66e\nlOkmbGzzjdQGIGfY7H3owmkuI5FMycV5TYDkLChasYSlW0sQSJD1j1CiM+qSAE7Y\npWiuEVjrSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----"
}'
Response
{
  "id": 9,
  "method": "custom",
  "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\nlhsBZ6JICiqmsieWRuSmMoiErBezVZ9QS5C5GOL4GkPsc7Bw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rSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----",
  "validUntil": "2019-03-02 03:26:27",
  "renewalDate": null,
  "enableHttp": false,
  "enableHsts": true,
  "authorizationMethod": null,
  "staging": false,
  "api_id": null,
  "ssl_protocol_id": 3,
  "created_at": "2019-06-30 11:37:29"
}

SSL Object

GET /servers/{serverId}/webapps/{webAppId}/ssl

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/ssl
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/ssl \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 9,
  "method": "custom",
  "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\/uSzKcuxZBQhdD9Y505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Di3zL4NWz+rcvIhO\nKoVAPPYawIAhOszSg3IGD0eVP1I7al5sME7GZPM3kPwxTNCv8z91mPaSyI5\/k88c\nm62Fijn4k92kWDOMF7ANFST6JhujB8OitHLFjB1Rapi0H0TpgAtiHCNYcgmFL66e\nlOkmbGzzjdQGIGfY7H3owmkuI5FMycV5TYDkLChasYSlW0sQSJD1j1CiM+qSAE7Y\npWiuEVjrSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----",
  "validUntil": "2019-03-02 03:26:27",
  "renewalDate": null,
  "enableHttp": false,
  "enableHsts": true,
  "authorizationMethod": null,
  "staging": false,
  "api_id": null,
  "ssl_protocol_id": 3,
  "created_at": "2019-06-30 11:37:29"
}

Update SSL Config

Parameters
enableHttprequiredBoolean true or false
enableHstsrequiredBoolean true or false
ssl_protocol_idOPTIONALIntegerSSL Protocol. You can get this value from Static Data API. It will current value if not supplied.
privateKeyrequired if provider is "custom"SSL Private Key
certificaterequired if provider is "custom"SSL Certificate

PATCH /servers/{serverId}/webapps/{webAppId}/ssl/{sslId}

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/ssl/{sslId}
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/ssl/9 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "enableHttp": true,
  "enableHsts": false,
  "ssl_protocol_id": 2,
  "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDem6F7HLVxStq/\n/t6aThEEntPgIjjgj1wL03hVTIHbDhzZ/hWh7KEo5nQCdL+HMJIGnpM/7htEVos0\nzkVT2QchP6p0p9PR1rY3+SVoxEcltJ9xug8EZ7Zut8F5VHjbNsTi7W0S3irj6MCg\nuVkSehE4PeV9P+zeXf+0A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0zkVT\n2QchP6p0p9PR1rY3+SVoxEcltJ9xug8EZ7Zut8F5VHjbNsTi7W0S3irj6MCguVkS\nehE4PeV9P+zeXf+0Aa7KwDiQHI1krvqY9DQda4IGyPeZI3cFbzFBYHhUK5amLU3i\nSpwNdBPWsgxQNNtsFnfOvmhuxxZ8B55TKATAVZ6UDI4DR1ysyCsJv8bajWroCEIQ\n61dyJb+H5eyTrd86qN46mYgGLNdoClOhQ4QISoz8mhWzFf/oIUbiHzBpslvorn+Y\nPEvDAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAA+HxyKESRAzUmDt1aE0v6u95QBB\niGGhVszAviF6ZKaf6bov0Ozq+67Pq+3Tksu685Giux+ZSWIlDi3zL4NWz+rcvIhO\nKoVAPPYawIAhOszSg3IGD0eVP1I7al5sME7GZPM3kPwxTNCv8z91mPaSyI5/k88c\nm62Fijn4k92kWDOMF7ANFST6JhujB8OitHLFjB1Rapi0H0TpgAtiHCNYcgmFL66e\nlOkmbGzzjdQGIGfY7H3owmkuI5FMycV5TYDkLChasYSlW0sQSJD1j1CiM+qSAE7Y\npWiuEVjrSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----"
}'
Response
{
  "id": 9,
  "method": "custom",
  "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDem6F7HLVxStq\/\n\/t6aThEEntPgIjjgj1wL03hVTIHbDhzZ\/hWh7KEo5nQCdL+HMJIGnpM\/7htEVos0\nzkVT2QchP6p0p9PR1rY3+SVoxEcltJ9xug8EZ7Zut8F5VHjbNsTi7W0S3irj6MCg\nuVkSehE4PeV9P+zeXf+0Aa7KwDiQHI1krvqY9DQda4IGyPeZI3cFbzFBYHhUK5am\nLU3iSpwNdBPWsgxQNNtsFnfOvmhuxxZ8B55TKATAVZ6UDI4DR1ysyCsJv8bajWro\nCEIQ61dyJb+H5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Y9DQda4IGyPeZI3cFbzFBYHhUK5amLU3i\nSpwNdBPWsgxQNNtsFnfOvmhuxxZ8B55TKATAVZ6UDI4DR1ysyCsJv8bajWroCEIQ\n61dyJb+H5eyTrd86qN46mYgGLNdoClOhQ4QISoz8mhWzFf\/oIUbiHzBpslvorn+Y\nPEvDAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAA+HxyKESRAzUmDt1aE0v6u95QBB\niGGhVszAviF6ZKaf6bov0Ozq+67Pq+3Tksu685Giux+ZSWIlDi3zL4NWz+rcvIhO\nKoVAPPYawIAhOszSg3IGD0eVP1I7al5sME7GZPM3kPwxTNCv8z91mPaSyI5\/k88c\nm62Fijn4k92kWDOMF7ANFST6JhujB8OitHLFjB1Rapi0H0TpgAtiHCNYcgmFL66e\nlOkmbGzzjdQGIGfY7H3owmkuI5FMycV5TYDkLChasYSlW0sQSJD1j1CiM+qSAE7Y\npWiuEVjrSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----",
  "validUntil": "2019-03-02 03:26:27",
  "renewalDate": null,
  "enableHttp": true,
  "enableHsts": false,
  "authorizationMethod": null,
  "staging": false,
  "api_id": null,
  "ssl_protocol_id": 2,
  "created_at": "2019-06-30 11:37:29"
}

Redeploy SSL (Let's Encrypt only)

PUT /servers/{serverId}/webapps/{webAppId}/ssl/{sslId}

HTTP Request
PUT https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/ssl/{sslId}
Request
curl --request PUT \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/ssl/10 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 10,
  "method": "letsencrypt",
  "privateKey": null,
  "certificate": null,
  "validUntil": null,
  "renewalDate": null,
  "enableHttp": true,
  "enableHsts": false,
  "authorizationMethod": "dns-01",
  "staging": true,
  "api_id": 2,
  "ssl_protocol_id": 2,
  "created_at": "2019-06-30 13:43:38"
}

Delete SSL

DELETE /servers/{serverId}/webapps/{webAppId}/ssl/{sslId}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/ssl/{sslId}
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/ssl/9 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 9,
  "method": "custom",
  "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+VBodQnHHaTj4lV59pYhQGvlHwkSDEHpuWAQKBgQD3Jh6sIY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GIGfY7H3owmkuI5FMycV5TYDkLChasYSlW0sQSJD1j1CiM+qSAE7Y\npWiuEVjrSYgJlcQfBnpQjkjAp2F4bp0TDQT7e+MNCOfA+lUdSWKyZVTLHF0=\n-----END CERTIFICATE-----",
  "validUntil": "2019-03-02 03:26:27",
  "renewalDate": null,
  "enableHttp": true,
  "enableHsts": false,
  "authorizationMethod": null,
  "staging": false,
  "api_id": null,
  "ssl_protocol_id": 2,
  "created_at": "2019-06-30 11:37:29"
}

Get Web Application settings

GET /servers/{serverId}/webapps/{webAppId}/settings

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/settings
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/settings \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,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",
  "timezone": "UTC",
  "maxExecutionTime": 30,
  "maxInputTime": 60,
  "maxInputVars": 1000,
  "memoryLimit": 256,
  "postMaxSize": 256,
  "uploadMaxFilesize": 256,
  "allowUrlFopen": true,
  "sessionGcMaxlifetime": 1440,
  "processManager": "ondemand",
  "processManagerStartServers": null,
  "processManagerMinSpareServers": null,
  "processManagerMaxSpareServers": null,
  "processManagerMaxChildren": 50,
  "processManagerMaxRequests": 500,
  "openBasedir": "\/home\/myuser\/webapps\/testing:\/var\/lib\/php\/session:\/tmp",
  "clickjackingProtection": true,
  "xssProtection": true,
  "mimeSniffingProtection": true
}

Change PHP version

Parameters
phpVersionrequiredStringRefer to Server section on how to get list of PHP version supported

PATCH /servers/{serverId}/webapps/{webAppId}/settings/php

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/settings/php
Request
curl --request PATCH \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/settings/php \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "phpVersion": "php72rc"
}'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php72rc",
  "stack": "hybrid",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}

Update PHP-FPM, NGiNX settings

Parameters
publicPathoptionalStringAppend a public path to a Web Application. If not defined, Web Application root path will be used as publicPath
stackrequiredString"hybrid", "nativenginx", or "customnginx"
stackModerequiredString"production" or "development"
clickjackingProtectionrequiredBoolean
xssProtectionrequiredBoolean
mimeSniffingProtectionrequiredBoolean
processManagerrequiredString"dynamic", "ondemand", or "static"
processManagerStartServersrequired if processManager is "dynamic"Integer
processManagerMinSpareServersrequired if processManager is "dynamic"Integer
processManagerMaxSpareServersrequired if processManager is "dynamic"Integer
processManagerMaxChildrenrequiredInteger
processManagerMaxRequestsrequiredInteger
openBasediroptionalStringIf 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"
timezonerequiredStringYou can get this from Static Data for Timezone
disableFunctionsoptionalStringIf you left this empty, no php functions will be disabled. If you wanted to supply the default value, see the request example
maxExecutionTimerequiredIntegerUse 0 for unlimited
maxInputTimerequiredIntegerUse 0 for unlimited
maxInputVarsrequiredIntegerUse 0 for unlimited
memoryLimitrequiredIntegerSupplied value is in MB.
postMaxSizerequiredIntegerSupplied value is in MB. Use 0 for unlimited
uploadMaxFilesizerequiredIntegerSupplied value is in MB. Use 0 for unlimited
sessionGcMaxlifetimerequiredIntegerSupplied value is in seconds
allowUrlFopenrequiredBoolean

PATCH /servers/{serverId}/webapps/{webAppId}/settings/fpmnginx

HTTP Request
PATCH https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/settings/fpmnginx
Request
curl --request PATCH \
  --url 'https://manage.runcloud.io/api/v2/servers/7/webapps/109/settings/fpmnginx' \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{
  "publicPath": null,
  "stack": "nativenginx",
  "stackMode": "development",
  "clickjackingProtection": true,
  "xssProtection": true,
  "mimeSniffingProtection": true,
  "processManager": "ondemand",
  "processManagerMaxChildren": 50,
  "processManagerMaxRequests": 500,
  "openBasedir": "/home/myuser/webapps/testing:/var/lib/php/session:/tmp",
  "timezone": "UTC",
  "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,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
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php72rc",
  "stack": "nativenginx",
  "stackMode": "development",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50",
  "setting": {
    "disableFunctions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,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",
    "timezone": "UTC",
    "maxExecutionTime": 30,
    "maxInputTime": 60,
    "maxInputVars": 1000,
    "memoryLimit": 256,
    "postMaxSize": 256,
    "uploadMaxFilesize": 256,
    "allowUrlFopen": true,
    "sessionGcMaxlifetime": 1440,
    "processManager": "ondemand",
    "processManagerStartServers": null,
    "processManagerMinSpareServers": null,
    "processManagerMaxSpareServers": null,
    "processManagerMaxChildren": 50,
    "processManagerMaxRequests": 500,
    "openBasedir": "\/home\/myuser\/webapps\/testing:\/var\/lib\/php\/session:\/tmp",
    "clickjackingProtection": true,
    "xssProtection": true,
    "mimeSniffingProtection": true
  }
}

Web Application action log

Query String Parameters
searchoptionalStringFilter log

GET /servers/{serverId}/webapps/{webAppId}/log

HTTP Request
GET https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}/log
Request
curl --request GET \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109/log \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "data": [
    {
      "kind": "Warning",
      "content": "Web Application settings was modified",
      "created_at": "2019-06-30 14:56:18"
    },
    {
      "kind": "Warning",
      "content": "Web Application settings was modified",
      "created_at": "2019-06-30 14:55:09"
    },
    {
      "kind": "Warning",
      "content": "Web Application settings was modified",
      "created_at": "2019-06-30 14:52:52"
    },
    ...
    ...
    ...
  ],
  "meta": {
    "pagination": {
      "total": 73,
      "count": 15,
      "per_page": 15,
      "current_page": 1,
      "total_pages": 5,
      "links": {
        "next": "https:\/\/runcloud-gateway.test\/api\/v2\/servers\/7\/webapps\/109\/log?page=2"
      }
    }
  }
}

Delete web application

DELETE /servers/{serverId}/webapps/{webAppId}

HTTP Request
DELETE https://manage.runcloud.io/api/v2/servers/{serverId}/webapps/{webAppId}
Request
curl --request DELETE \
  --url https://manage.runcloud.io/api/v2/servers/7/webapps/109 \
  -u YOUR_API_KEY:YOUR_API_SECRET \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response
{
  "id": 109,
  "server_user_id": 142,
  "name": "testing",
  "rootPath": "\/home\/myuser\/webapps\/testing",
  "publicPath": "\/home\/myuser\/webapps\/testing",
  "phpVersion": "php72rc",
  "stack": "nativenginx",
  "stackMode": "production",
  "type": "custom",
  "defaultApp": false,
  "alias": null,
  "pullKey1": "jwMZwtXP3ItQRKKoMSZboAXr1561748870",
  "pullKey2": "zU4gYF96NZGjNqGSjUhasn0YZmlK2Ctu",
  "created_at": "2019-06-28 19:07:50"
}