openapi: 3.2.0 info: contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ description: UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings. license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ title: cPanel U Passenger Apps API version: 11.137.9999.106 x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. security: - BasicAuth: [] tags: - description: The PassengerApps module for UAPI. name: PassengerApps paths: /PassengerApps/disable_application: get: x-readonly: false x-rollback: none description: 'This function disables a Passenger application on an account. **Important:** When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-disable_application parameters: - description: The application to disable. in: query name: name required: true schema: example: slippers type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: disable_application type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: default: null type: - object - 'null' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object description: HTTP Request was successful. summary: Disable Passenger application tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n disable_application \\\n name='slippers'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/disable_application?name=slippers - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_disable_application.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_disable_application.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/disable_application/,\n {\n 'name' => 'slippers',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_disable_application.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_disable_application.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'disable_application',\n array (\n 'name' => 'slippers',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 /PassengerApps/edit_application: get: x-readonly: false x-rollback: none description: 'This function edits a Passenger application for an account. **Note**: When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-edit_application parameters: - description: The application’s current name. in: query name: name required: true schema: example: Ruby Slippers type: string - description: Whether to clear the application’s environment variables. in: query name: clear_envvars required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: "The new server environment in which to run the application. If you do not use this parameter, the function does not change the application’s server environment.\n\n * `development` — Sets the application to run in a development environment.\n * `production` — Sets the application to run in a production environment." in: query name: deployment_mode required: false schema: enum: - production - development example: production type: string - description: The application’s new domain. If you do not use this parameter, the function does not change the application’s domain. in: query name: domain required: false schema: example: toto.com format: domain type: string - description: "Whether to enable the application and generate the web server configuration for it.\n\n * `1` — Enable the application and generate the web server configuration.\n * `0` — Don’t enable the application and generate the web server configuration." in: query name: enabled required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: "New set of environment variables for the application.\n\n**Important**:\n\n The function replaces all current environment variables with the variables that you pass in this parameter.\n\n**Note**:\n\n For each `envvar_name` parameter you send you **must** include an `envvar_value` parameter." explode: true in: query name: envvar_name required: false schema: example: - SCARECROW - TINMAN - LION items: type: string type: array style: form - description: "Each environment variable’s value.\n\n**Note**:\n\n For each `envvar_name` parameter you send you **must** include an `envvar_value` parameter." in: query name: envvar_value required: false schema: example: - brain - heart - courage items: type: string maxLength: 1024 minLength: 1 type: array style: form - description: The application’s new name. If you do not use this parameter, the function does not change the application's name. in: query name: new_name required: false schema: example: Little Dog type: string - description: The application’s new filepath. If you do not use this parameter, the function does not change the application’s filepath. in: query name: path required: false schema: example: /home/dorothy/littledog format: path type: string responses: '200': content: application/json: example: data: Little Dog: base_uri: /littledog deployment_mode: production domain: toto.com enabled: 1 envvars: LION: courage SCARECROW: brain TINMAN: heart name: Little Dog path: /home/dorothy/littledog errors: null messages: null metadata: {} status: 1 schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: edit_application type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: additionalProperties: description: 'An object describing the newly-edited application. **Note**: `application_name` is the `name` of the application.' maxProperties: 1 properties: base_uri: description: The URI of the application. format: url-path type: string deployment_mode: description: The deployment mode of the application. enum: - production - development type: string domain: description: The domain of the application. format: domain type: string enabled: description: "Whether the application is enabled or not.\n\n * `1` — Enabled.\n * `0` — Disabled." enum: - 1 - 0 type: integer envvars: description: An object of the application’s environment variables and their values. type: object name: description: The name of the application. type: string path: description: The path of the application inside the user’s home directory. format: path type: string type: object x-additionalPropertiesName: application_name type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- `1` — Success. - `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Update Passenger application settings tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n edit_application \\\n name='Ruby Slippers'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/edit_application?name=Ruby%20Slippers - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_edit_application.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_edit_application.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/edit_application/,\n {\n 'name' => 'Ruby Slippers',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_edit_application.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_edit_application.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'edit_application',\n array (\n 'name' => 'Ruby Slippers',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 /PassengerApps/enable_application: get: x-readonly: false x-rollback: none description: 'This function enables a Passenger application and generates the Apache configuration on an account. **Important:** When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-enable_application parameters: - description: The Passenger application to enable on the account. in: query name: name required: true schema: example: slippers type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: enable_application type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: default: null type: - object - 'null' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API. example: null items: type: string type: - array - 'null' type: object description: HTTP Request was successful. summary: Enable Passenger application tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n enable_application \\\n name='slippers'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/enable_application?name=slippers - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_enable_application.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_enable_application.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/enable_application/,\n {\n 'name' => 'slippers',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_enable_application.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_enable_application.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'enable_application',\n array (\n 'name' => 'slippers',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 /PassengerApps/ensure_deps: get: x-readonly: false x-rollback: none description: 'This function installs the dependencies for a Passenger application. **Note**: This function starts the installation process. This may take a long time to complete. **Important**: When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-ensure_deps parameters: - description: The application’s filepath. in: query name: app_path required: true schema: example: /home/example/my-app/ format: path type: string - description: 'The application’s type. * `gem` — Ensure ruby gems in the application’s `Gemfile` file. * `npm` — Ensure node packages in the application’s `package.json` file. * `pip` — Ensure python pips in the application’s `requirements.txt` file.' in: query name: type required: true schema: enum: - gem - npm - pip example: npm type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: ensure_deps type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: properties: sse_url: description: The SSE URI to track the progress of the process. example: /sse/UserTasks/00000000_5c6c8b18228a35/ensure_deps.log format: url-path type: string task_id: description: The task id of the SSE process. example: 00000000/5c76ec5566332c type: string type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- `1` - Success. - `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Install Passenger application dependencies tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n ensure_deps \\\n type='npm' \\\n app_path='/home/example/my-app/'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/ensure_deps?type=npm&app_path=%2fhome%2fexample%2fmy-app%2f - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_ensure_deps.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_ensure_deps.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/ensure_deps/,\n {\n 'type' => 'npm',\n 'app_path' => '/home/example/my-app/',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_ensure_deps.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_ensure_deps.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'ensure_deps',\n array (\n 'type' => 'npm',\n 'app_path' => '/home/example/my-app/',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 80 /PassengerApps/list_applications: get: x-readonly: true description: 'This function lists an account’s Passenger applications. **Important:** When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-list_applications parameters: [] responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: list_applications type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: additionalProperties: description: '**Note**: The top-level keys are the names of the applications. The value is the object defined here.' properties: base_uri: description: The URI of the application. example: /uri-of-app format: url-path type: string deployment_mode: description: "The deployment mode of the application.\n\n * `development` — Sets the application to run in a development environment.\n * `production` — Sets the application to run in a production environment." enum: - production - development example: production type: string deps: properties: gem: description: The shell command to ensure ruby dependencies. It is `0` if there are no ruby dependencies. example: '0' type: string npm: description: The shell command to ensure node dependencies. It is `0` if there are no node dependencies. example: '0' type: string pip: description: The shell command to ensure python dependencies. It is `0` if there are no python dependencies. example: '0' type: string type: object domain: description: The domain of the application example: example.com format: domain type: string enabled: description: 'The application’s enabled status. * `1` — Enabled. * `0` — Disabled.' envvars: description: The environment variables set for the application. type: - object - 'null' name: description: The name of the application example: My Application type: string nodejs: description: 'The path of the Nodejs executable. Passenger uses Nodejs to run the application. **Note**: The function only returns this value if you configure this application to use Nodejs.' example: /opt/cpanel/ea-nodejs10/bin/node format: path type: string path: description: The path of the application example: /home/user/app-path format: path type: string python: description: 'The path of the Python executable. Passenger uses Python to run the application. **Note**: The function only returns this value if you configure this application to use Python.' example: /usr/bin/python format: path type: string ruby: description: 'The path of the Ruby executable. Passenger uses Ruby to run the application. **Note**: The function only returns this value if you configure this application to use Ruby.' example: /opt/cpanel/ea-ruby27/root/usr/libexec/passenger-ruby27 format: path type: string type: object description: An object describing each application. example: Name of Application 1: base_uri: /app1-uri deployment_mode: production deps: gem: '0' npm: '0' pip: cd /home/user/app1-dir && pip install --user -r requirements.txt domain: example.com enabled: 1 envvars: {} name: Name of Application 1 path: /home/user/app1-dir Name of Application 2: base_uri: /app2-uri deployment_mode: development deps: gem: cd /home/user/app2-dir && BUNDLE_PATH=~/.gem /path/to/ruby/version/package/bundler install npm: '0' pip: '0' domain: example.com enabled: 1 envvars: {} name: Name of Application 2 path: /home/user/app2-dir type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- `1` — Success. - `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return Passenger applications tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n list_applications\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/list_applications - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_list_applications.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_list_applications.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/list_applications/\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_list_applications.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_list_applications.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'list_applications'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 /PassengerApps/register_application: get: x-readonly: false x-rollback: none description: 'This function registers a Passenger application for an account. **Important**: * This function **only** registers an application. It does **not** create the application. You **must** create an application **before** you register the application. For an example of how to do this, read our How to Create Ruby Web Applications documentation. * When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-register_application parameters: - description: The domain for which to register the application. in: query name: domain required: true schema: example: dorothy.com format: domain type: string - description: The application’s name. in: query name: name required: true schema: example: Name of Application maxLength: 50 minLength: 1 type: string - description: The application’s filepath relative to the user’s home directory. in: query name: path required: true schema: example: /slippers format: path type: string - description: The application’s base URI. in: query name: base_uri required: false schema: default: / example: /ruby format: url-path type: string - description: "The type of server environment in which to run the application.\n\n * `development` — Sets the application to run in a development environment.\n * `production` — Sets the application to run in a production environment." in: query name: deployment_mode required: false schema: default: production enum: - production - development example: production type: string - description: "Whether to enable the application and generate the web server configuration for it.\n\n * `1` — Enable the application and generate the web server configuration.\n * `0` — Don’t enable the application and generate the web server configuration." in: query name: enabled required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: "Environment variables that the application needs.\n\n**Note**:\n\n For each `envvar_name` parameter you send, you **must** include an `envvar_value` parameter.\n\n This parameter's value can only contain letters, numbers, underscores, and dashes, and cannot begin with a number. This parameter's value must also not exceed 256 characters." explode: true in: query name: envvar_name required: false schema: example: - SHOES - TINMAN items: type: string maxLength: 256 type: array style: form - description: "Each environment variable’s value.\n\n**Note**:\n\n For each `envvar_name` parameter you send, you **must** include an `envvar_value` parameter.\n\n An environment variable value must contain 1024 or fewer ASCII-printable characters." explode: true in: query name: envvar_value required: false schema: example: - ruby - heart items: type: string maxLength: 1024 type: array style: form responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: register_application type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: additionalProperties: description: "The application’s configuration information.\n\n **Note**:\n\n The top-level key is the name of the application.\n\n The value is the object defined here." properties: base_uri: description: The URI of the application. format: url-path type: string deployment_mode: description: "The deployment mode of the application.\n\n * `development` — Sets the application to run in a development environment.\n * `production` — Sets the application to run in a production environment." enum: - production - development type: string domain: description: The domain of the application. type: string enabled: description: "Whether the application is enabled or not.\n\n * `1` — Enabled.\n * `0` — Disabled." enum: - 1 - 0 type: integer envvars: description: An object of the application’s environment variables and their values. type: object name: description: The name of the application. type: string path: description: The path of the application inside the user’s home directory. format: path type: string description: An object describing the newly-registered application. example: Name of Application: base_uri: /ruby deployment_mode: production domain: dorothy.com enabled: 1 envvars: SHOES: ruby TINMAN: heart name: Name of Application path: /home/dorothy/slippers type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- `1` — Success. - `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Register Passenger application tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n register_application \\\n name='Name of Application' \\\n path='/slippers' \\\n domain='dorothy.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/register_application?name=Name%20of%20Application&path=%2fslippers&domain=dorothy.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_register_application.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_register_application.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/register_application/,\n {\n 'name' => 'Name of Application',\n 'path' => '/slippers',\n 'domain' => 'dorothy.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_register_application.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_register_application.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'register_application',\n array (\n 'name' => 'Name of Application',\n 'path' => '/slippers',\n 'domain' => 'dorothy.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 /PassengerApps/unregister_application: get: x-readonly: false x-rollback: none description: 'This function unregisters a Passenger application on an account. **Note:** * This function **only** unregisters an application. It does **not** delete the application. You **must** manually delete the application from your system. * When you disable the Web Server role, the system **disables** this function.' operationId: PassengerApps-unregister_application parameters: - description: The application to unregister. in: query name: name required: true schema: example: slippers type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: unregister_application type: string module: description: The name of the module called. example: PassengerApps type: string result: properties: data: default: null type: - object - 'null' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object description: HTTP Request was successful. summary: Unregister Passenger application tags: - PassengerApps x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n PassengerApps \\\n unregister_application \\\n name='slippers'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/PassengerApps/unregister_application?name=slippers - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file PassengerApps_unregister_application.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/PassengerApps_unregister_application.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/PassengerApps/,\n q/unregister_application/,\n {\n 'name' => 'slippers',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file PassengerApps_unregister_application.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/PassengerApps_unregister_application.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'PassengerApps',\n 'unregister_application',\n array (\n 'name' => 'slippers',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 66 components: securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-tagGroups: - name: API Development Tools tags: - API Token Management - Batch - SSE Task Management - URL Parsing - name: Authentication tags: - External Authentication - Two-Factor Settings - name: Backup Information tags: - BackupInfo - BackupInfo Status - name: Block Ip Addresses tags: - Block IP - name: Commerce Integration tags: - Market Integration - SSL Certificates - name: Contact Information tags: - Contact Information - name: cPanel Account tags: - Account Enhancements - Account Information - Account Management - AuditLog - Contact Information - cPanel Features - Disk Quotas - DomainRecommendations - Personalization - Resource Usage and Statistics - Subaccount Management - Team Roles - Team Users - name: cPanel Account Backups tags: - Backup - File Restoration - name: cPanel Plugin Framework tags: - Formbricks - Plugins - name: cPanel Theme Management tags: - Application Information - Brand Management - Branding Files - Browser Cache Management - Language - Theme Settings - name: Directory Management tags: - Directory Indexes - Directory Privacy - Directory Protection - name: DNS tags: - DNS - DNS Information - DNS Security - Dynamic DNS - Email DNS Settings - ZoneEdit - name: Domain tags: - Domain - name: Domain Management tags: - AddonDomain - Direct Link Protection (Hotlink) - Domain - Domain Information - Domain Redirection - DomainLookup - Park - SubDomain - Virtual Host Information - name: Domains tags: - Subdomains - name: Email tags: - Email Accounts - Email Filtering - Email Forwarding - Email Server Information - Email Suspensions - Mail Server Information - Mailbox Management - Mailing Lists - Signing and Encryption (GnuPG Keys) - Spam Filtering (Greylisting) - Spam Management - Spam Prevention (BoxTrapper) - Webmail Applications - Webmail Sessions - name: Extract Information tags: - ExtractInfo - ExtractInfo Status - name: File Manager tags: - Trash - name: Files tags: - FTP Accounts - FTP Server Settings - Image Tools - Jodit - Manage Files - Manage Files - WebDisk Settings - name: GIT Management tags: - Deployment Settings - Repository Management - name: InProductSurvey tags: - InProductSurvey - name: MySQL and MariaDB tags: - Database Information - Database Management - Remote Databases - User Management - name: Notifications tags: - Pushbullet - name: Optional Applications tags: - Antivirus Protection (ClamAV) - Calendar and Contacts (DAV) - Calendar and Contacts Server - WordPress Manager Backups - name: PostgreSQL tags: - PostgreSQL Database Management - PostgreSQL User Management - name: Retrieve bandwidth information tags: - Bandwidth - name: Security tags: - Known SSH Hosts Management - Login Information - name: Server Information tags: - cPanel Server Information - Notifications - Password Strength - SSH - WebPros MCP - WebProsMCP - name: ServiceProxy tags: - ServiceProxy - name: Site Quality Monitoring tags: - SiteQuality - name: SSL Certificates tags: - Auto-generated SSL Certificates - cPanel Account SSL Management - SNI Email Settings - SSL Certificate Management - Verify Domain Ownership - name: Statistics tags: - Domain Statistics - Weblog Settings - name: UserData tags: - UserData - name: Web Server Configuration tags: - EA4 - EasyApache Settings - PHP - name: Web Server Management tags: - Application Manager - ModSecurity - NginxCaching - PHP Settings - Web Apps - name: Website Configuration tags: - Handler Management - Logs - Mime Type Management - Nova - Site Information - Site Installation - Sitejet - WPX