### Get CMS Installation Details Source: https://api.planethoster.com Fetches details of a specific CMS installation, including its path, type, and configuration. Useful for verifying installation parameters. ```json { "data": [ { "path": "/home/username/public_html", "cmsType": "prestashop", "cmsConfig": { "domain": "www.domain.com/prestashop", "lscache": { "pluginName": "litespeedcache", "installed": true, "enabled": true } } } ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### List WordPress Installations Response Source: https://api.planethoster.com Successful response listing WordPress installations. Includes path, URL, and version for each installation. ```json { "data": [ { "path": "/home/username/public_html", "url": "https://mydomain.com/wordpress", "version": "6.6.4" } ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Install CMS Response Source: https://api.planethoster.com Confirms the initiation of a CMS installation. Returns a unique identifier for the installation process. ```json { "data": "12fa6890-a2a2-223ea-a22a-847de9698035", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Install CMS Source: https://api.planethoster.com Initiates the installation of a Content Management System (CMS) on a specified domain and path with provided configurations. ```APIDOC ## POST /hosting/cms ### Description Installs a Content Management System (CMS) on the specified domain and path with the provided configurations. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/cms ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **cmsType** (string) - Required - The type of CMS to install (e.g., Joomla, PrestaShop). - **tagName** (string) - Required - The version of the CMS to install. - **path** (string) - Required - The installation path relative to the domain. - **domain** (string) - Required - The domain name where the CMS will be hosted. - **siteName** (string) - Required - The title of the website. - **adminName** (string) - Required - The administrator username for the CMS backend. - **adminPassword** (string) - Required - The administrator password for the CMS backend. - **email** (string) - Required - The administrator's email address. - **www** (boolean) - Optional - Defaults to false. Indicates if the domain should use 'www'. - **https** (boolean) - Optional - Defaults to true. Indicates if the domain should force HTTPS. ### Request Example ```json { "id": 2222, "cmsType": "joomla", "tagName": "5.3.3", "path": "jooomla-test/", "domain": "exampledomain.com", "siteName": "Mon joomla de test", "adminName": "JoomlaAdmin", "adminPassword": "(%S0L1dP@SsW0RdZ%&)", "email": "john@doe.com", "www": false, "https": true } ``` ### Responses #### Success Response (200) - **data** (string) - A unique identifier for the installation process. - **success** (boolean) - Indicates if the request was successful. - **errors** (array) - List of errors encountered. - **reseller_id** (string) - The reseller ID associated with the account. ### Response Example ```json { "data": "12fa6890-a2a2-223ea-a22a-847de9698035", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Start Python Application Source: https://api.planethoster.com Starts a Python application hosted on your account using the specified root directory and domain. ```APIDOC ## POST /hosting/python/start ### Description Starts a Python application hosted on your account. This endpoint initiates the application using the specified root directory and domain. Upon success, it returns a confirmation message. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/python/start ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **appRoot** (string) - Required - The root directory of the Python application to start. - **domain** (string) - Required - The domain name associated with your Python application. ### Request Example ```json { "id": 2222 } ``` ### Response #### Success Response (200) - **result** (string) - Indicates the status of the operation. - **timestamp** (number) - The time the request was processed. - **success** (boolean) - True if the operation was successful. - **errors** (array) - An array of errors, if any. - **reseller_id** (string) - The reseller ID associated with the account. #### Response Example ```json { "result": "success", "timestamp": 1727963354.9170904, "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Install WordPress Source: https://api.planethoster.com Installs a new WordPress instance on the hosting account, allowing specification of admin credentials, domain, path, and other settings. ```APIDOC ## POST /hosting/wordpress ### Description Installs WordPress on your hosting account with specified configuration details. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/wordpress ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **adminUser** (string) - Required - The username for the WordPress admin account. - **adminPassword** (string) - Required - The password for the admin account. - **adminEmail** (string) - Required - The email address for the admin account. - **domain** (string) - Required - The domain name for the WordPress installation. - **path** (string) - Optional - The directory path for the installation. - **title** (string) - Required - The title of the WordPress site. - **locale** (string) - Optional - The locale for the installation (default: "fr_FR"). - **https** (boolean) - Optional - Whether to use HTTPS (default: true). - **database** (object) - Optional - Custom database parameters for the installation. ### Request Example ```json { "id": 2222, "adminUser": "admin", "adminPassword": "password123", "adminEmail": "admin@example.com", "domain": "example.com", "title": "My WordPress Site", "path": "/public_html/my-site", "locale": "en_US", "https": true, "database": { "db_name": "wp_db", "db_user": "wp_user", "db_password": "wp_pass" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **success** (boolean) - Indicates if the operation was successful. - **errors** (array) - List of errors, if any. - **reseller_id** (string) - The reseller ID. #### Response Example ```json { "message": "WordPress installation initiated successfully.", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Successful Response for Get PHP Options Source: https://api.planethoster.com Example of a successful response when retrieving PHP configuration options. It includes default values, comments, and current settings for various options. ```json { "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7", "allow_url_fopen": { "default": "On", "comment": "Allows PHP file functions to retrieve data from remote locations over FTP or HTTP. This option is a great security risk, thus do not turn it on without necessity.", "type": "bool" }, "memory_limit": { "default": "512M", "comment": "The maximum amount of memory in bytes a script is allowed to allocate. Set the value to -1 to have no memory limit (not recommended). Use shortcuts for byte values: K (kilo), M (mega), and G (giga). For example, 128M", "type": "list", "range": "64M,128M,192M,256M,368M,512M,1G", "value": "256M" } } ``` -------------------------------- ### Example Response: Get Node.js Application Details Source: https://api.planethoster.com This JSON structure represents a successful response when retrieving details of a Node.js application. It includes application root, version, URI, domain, startup file, status, and source active path. ```json { "data": [ { "appRoot": "myapp_node", "version": "20", "uri": "node/new", "domain": "mydomain.com", "startUpFile": "start.js", "status": "started", "srcActive": "/home/wrfqyfwe/nodevenv/myapp_node/20/bin/activate" } ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Hosting Accounts Response Example Source: https://api.planethoster.com Example JSON response for hosting accounts, listing details such as username, domain, and status. ```json { "hosting_accounts": [ { "id": 2222, "username": "dhshlkdf", "domain": "test-domain.com", "status": "Active", "status_details": "", "hostname": "world-server.test.planethoster.net", "ip": "192.168.0.1", "location": "CA", "type": "shared", "package": "Standard Account", "n0c_storage": { "quota": 100, "used": 12 }, "litespeed": "false", "notes": "", "temporary_url": "xg8bci.n0c.world" } ] } ``` -------------------------------- ### Install a CMS Source: https://api.planethoster.com Initiates the installation of a Content Management System (CMS) on a specified domain and path with provided configurations. Requires hosting account ID, CMS type, version, path, domain, site name, admin credentials, and email. ```json { "id": 2222, "cmsType": "joomla", "tagName": "5.3.3", "path": "jooomla-test/", "domain": "exampledomain.com", "siteName": "Mon joomla de test", "adminName": "JoomlaAdmin", "adminPassword": "(%S0L1dP@SsW0RdZ%&)", "email": "john@doe.com", "www": false, "https": true } ``` -------------------------------- ### Get CMS Installation Progress Source: https://api.planethoster.com Retrieves a list of CMS installations that are currently in progress or have been recently installed on the hosting account. ```APIDOC ## GET /hosting/cms/installations-progress ### Description Retrieves a list of CMS installations currently in progress or recently installed on the hosting account. ### Method GET ### Endpoint https://api.planethoster.net/v4/hosting/cms/installations-progress ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. ### Request Example ```json { "id": 2222 } ``` ### Responses #### Success Response (200) - **data** (array) - List of ongoing or recent CMS installations. - **success** (boolean) - Indicates if the request was successful. - **errors** (array) - List of errors encountered. - **reseller_id** (string) - The reseller ID associated with the account. ### Response Example ```json { "data": [], "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Start Node.js Application Source: https://api.planethoster.com Starts a Node.js application hosted on your account. This endpoint requires the hosting account ID, the application's root directory, and the associated domain name. ```APIDOC ## POST /v4/hosting/node/start ### Description Starts a Node.js application hosted on your account. This endpoint requires the hosting account ID, the application's root directory, and the associated domain name. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/node/start ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **appRoot** (string) - Required - The root directory of the Node.js application to start. - **domain** (string) - Required - The domain name associated with your Node.js application. ### Request Example ```json { "id": 2222, "appRoot": "/path/to/your/app", "domain": "example.com" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the application has started. - **success** (boolean) - True if the operation was successful. - **errors** (array) - An array of errors, if any. - **reseller_id** (string) - The reseller ID associated with the account. #### Response Example ```json { "message": "Successfully started nodejs application", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### World Info Response Example Source: https://api.planethoster.com Example JSON response for the World hosting service, detailing account availability and active accounts. ```json { "available_standard_account": 8, "available_ultra_account": 1, "nb_active_or_suspended_accounts": 2, "world_accounts": [ { "id": 2222, "status": "Active", "status_details": "", "username": "dhshlkdf", "domain": "test-domain.com", "hostname": "world-server.test.planethoster.net", "ip": "192.168.0.1", "location": "CA", "type": "shared", "package": "World Limited", "resources": { "cpu": 6, "io": 12, "mem": 12 }, "storage": { "quota": 100000, "used": 12 }, "n0c_storage": { "quota": 100, "used": 12 }, "litespeed": "false", "notes": "", "temporary_url": "xg8bci.n0c.world" } ] } ``` -------------------------------- ### Start Node.js Application Response Source: https://api.planethoster.com A successful response (200 OK) for a Node.js application start request, confirming the application has been initiated. ```json { "message": "Successfully started nodejs application", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### List WordPress Installations Source: https://api.planethoster.com Retrieves a list of all WordPress installations on the hosting account, including their file path, URL, and version. ```APIDOC ## GET /hosting/wordpress ### Description Retrieves a list of all WordPress installations associated with your account. ### Method GET ### Endpoint https://api.planethoster.net/v4/hosting/wordpress ### Parameters #### Query Parameters - **id** (integer) - Required - The hosting account ID. ### Response #### Success Response (200) - **data** (array) - A list of WordPress installation objects. - **path** (string) - The file path of the WordPress installation. - **url** (string) - The URL of the WordPress installation. - **version** (string) - The version of WordPress installed. - **success** (boolean) - Indicates if the operation was successful. - **errors** (array) - List of errors, if any. - **reseller_id** (string) - The reseller ID. #### Response Example ```json { "data": [ { "path": "/home/username/public_html", "url": "https://mydomain.com/wordpress", "version": "6.6.4" } ], "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Successful Custom SSL Installation Response Source: https://api.planethoster.com Response indicating successful installation of a custom SSL certificate. ```json { "message": "Successfully installed custom ssl", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### WordPress Installation Response Source: https://api.planethoster.com This JSON object represents a successful WordPress installation response, indicating the installation was completed successfully. ```json { "message": "Successfully installed wordpress", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Install Custom SSL Source: https://api.planethoster.com Installs a custom SSL certificate for a specified domain. This requires the hosting account ID, domain name, SSL certificate, and its private key. ```APIDOC ## POST /hosting/domain/ssl/custom ### Description Installs a custom SSL certificate for a specified domain. This requires the hosting account ID, domain name, SSL certificate, and its private key. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/domain/ssl/custom ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **domain** (string) - Required - The domain name for which the SSL certificate will be installed. - **certificate** (string) - Required - The SSL certificate. - **privateKey** (string) - Required - The private key associated with the SSL certificate. ### Request Example ```json { "id": 2222, "domain": "example.com", "certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "privateKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----" } ``` ### Response #### Success Response (200) - **message** (string) - Indicates successful installation. - **success** (boolean) - True if the operation was successful. - **errors** (array) - An array of errors, if any. - **reseller_id** (string) - The reseller ID. #### Response Example ```json { "message": "Successfully installed custom ssl", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Example API Response - Login URL Source: https://api.planethoster.com This is an example of a successful API response containing a login URL for a service. ```json { "data": { "login_url": "https://mg.n0c.com/api/login-from-front..." }, "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Install Custom SSL Certificate Source: https://api.planethoster.com Use this endpoint to install a custom SSL certificate for a specified domain. Requires hosting account ID, domain name, certificate, and private key. ```json { "id": 2222, "domain": "example.com", "certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "privateKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----" } ``` -------------------------------- ### HybridCloud Info Response Example Source: https://api.planethoster.com Example JSON response for HybridCloud information, including server details and associated World accounts. ```json { "nb_n0c_hybridcloud": 2, "n0c_hybridclouds": [ { "id": 2222, "hostname": "hc-lovelysuperfrog-ca.n0c.com", "ip": "192.168.0.1", "location": "Canada (Quebec)", "cpu": 16, "disk_space": 60, "memory": 32, "world_accounts": [ { "id": 2222, "status": "Active", "status_details": "", "username": "dhshlkdf", "domain": "test-domain.com", "hostname": "world-server.test.planethoster.net", "ip": "192.168.0.1", "location": "CA", "type": "shared", "package": "World Limited", "resources": { "cpu": 6, "io": 12, "mem": 12 }, "storage": { "quota": 100000, "used": 12 }, "n0c_storage": { "quota": 100, "used": 12 }, "litespeed": "false", "notes": "", "temporary_url": "xg8bci.n0c.world" } ] } ] } ``` -------------------------------- ### Start Python Application Response Source: https://api.planethoster.com This JSON object represents a successful response when starting a Python application. ```json { "message": "Successfully started python application", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Install Custom SSL Certificate Source: https://api.planethoster.com This endpoint allows you to install a custom SSL certificate for a domain. You must provide the certificate and its private key. Ensure the certificate is correctly formatted and matches the domain. -------------------------------- ### Get CMS Installations Source: https://api.planethoster.com Retrieves a list of CMS installations on the hosting account. This endpoint is useful for checking existing installations. ```APIDOC ## GET /hosting/cms ### Description Retrieves a list of CMS installations on the hosting account. ### Method GET ### Endpoint https://api.planethoster.net/v4/hosting/cms ### Responses #### Success Response (200) - **data** (array) - List of CMS installations. - **path** (string) - The installation path of the CMS. - **cmsType** (string) - The type of CMS installed (e.g., prestashop). - **cmsConfig** (object) - Configuration details for the CMS. - **domain** (string) - The domain associated with the CMS. - **lscache** (object) - LiteSpeed Cache configuration. - **pluginName** (string) - Name of the LiteSpeed Cache plugin. - **installed** (boolean) - Indicates if the plugin is installed. - **enabled** (boolean) - Indicates if the plugin is enabled. - **success** (boolean) - Indicates if the request was successful. - **errors** (array) - List of errors encountered. - **reseller_id** (string) - The reseller ID associated with the account. ### Response Example ```json { "data": [ { "path": "/home/username/public_html", "cmsType": "prestashop", "cmsConfig": { "domain": "www.domain.com/prestashop", "lscache": { "pluginName": "litespeedcache", "installed": true, "enabled": true } } } ], "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Get WordPress Login URL Source: https://api.planethoster.com This endpoint retrieves the automatic login URL for your WordPress installation. You need to provide the hosting account ID and the path to the WordPress installation. ```APIDOC ## GET /v4/hosting/wordpress/login ### Description This endpoint retrieves the automatic login URL for your WordPress installation. ### Method GET ### Endpoint https://api.planethoster.net/v4/hosting/wordpress/login ### Parameters #### Request Body - **id** (integer) - Required - The identification number (ID) of the hosting account. - **path** (string) - Required - The directory path where WordPress is installed. ### Request Example ```json { "id": 2222, "path": "/home/myuser/public_html" } ``` ### Response #### Success Response (200) - **url** (string) - The automatic login URL for WordPress. - **success** (boolean) - Indicates if the operation was successful. - **errors** (array) - An array of errors, if any occurred. - **reseller_id** (string) - The reseller ID associated with the account. #### Response Example ```json { "url": "https://mydomain.com/n0c_m4npnmjmk6gp5ysxoco0puk63objbfcx.php?randkey=Nk8O33TalAAzfRdsCaBhdCc0bo9SyJVk&token=MHidDE0xc3dd7HyWC8Czw1rhSjJTlerM", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Get WordPress Login URL Request Payload Source: https://api.planethoster.com This JSON payload is used to request the automatic login URL for a WordPress installation. It requires the hosting account ID and the installation path. ```json { "id": 2222, "path": "/home/myuser/public_html" } ``` -------------------------------- ### Get WordPress Login URL Response Source: https://api.planethoster.com This JSON object contains the automatic login URL for a WordPress installation upon successful request. ```json { "url": "https://mydomain.com/n0c_m4npnmjmk6gp5ysxoco0puk63objbfcx.php?randkey=Nk8O33TalAAzfRdsCaBhdCc0bo9SyJVk&token=MHidDE0xc3dd7HyWC8Czw1rhSjJTlerM", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### cURL Request to Get WAF Rules Source: https://api.planethoster.com Example cURL command to retrieve WAF rules for a domain, including necessary authorization headers. ```bash curl -X GET https://api.planethoster.net/v4/hosting/domain/waf/rules \ -H "X-API-KEY: YOUR_API_KEY" \ -H "X-API-USER: YOUR_API_USER" \ -d '{ "id": 2222 }' ``` -------------------------------- ### 200 OK JSON Response Example Source: https://api.planethoster.com This JSON structure represents a successful API response (200 OK) containing data about a running service, its configuration, and associated metadata. It includes details like service ID, status, CMS type, timestamps, installation parameters, success status, and reseller ID. ```json { "data": [ { "id": "12fa6890-a2a2-223ea-a22a-847de9698035", "status": "running", "cmsType": "joomla", "time": "2023-05-25T14:40:01.922798012Z", "installParams": { "tagName": "1.1.1", "user": "doexcvbn", "domain": "exampledomain.com", "path": "jooomla-test/" } } ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Example Response Listing Node.js Versions Source: https://api.planethoster.com This JSON response lists the available Node.js interpreter and its supported versions. ```json { "interpreter": "nodejs", "versions": [ "16", "18", "20" ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Example JSON Response for Restarting Application Source: https://api.planethoster.com This is a sample JSON response indicating a successful restart of a Node.js application. ```json { "message": "Successfully restarted nodejs application", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Create Database with User and Privileges Source: https://api.planethoster.com Use this endpoint to create a new database, a database user, and grant specific privileges. The hosting account ID can be found using /v4/the-world/info or /v4/hybridcloud/info. ```json { "id": 2222, "databaseName": "user_mydatabase", "databaseType": "MYSQL", "databaseUsername": "user_newuser", "password": "(%S0L1dP@SsW0RdZ%&)", "privileges": [ "ALL PRIVILEGES" ] } ``` ```json { "database_created": true, "database_user_created": true, "database_privileges_granted": true, "database_name": "user_mydatabase", "database_type": "MYSQL", "database_username": "user_newuser", "password": "(%S0L1dP@SsW0RdZ%&)", "privileges": [ "ALL PRIVILEGES" ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Delete WordPress Installation Source: https://api.planethoster.com This endpoint allows you to delete an existing WordPress installation from your hosting account. You need to provide the hosting account ID and the path to the WordPress installation. ```APIDOC ## DELETE /v4/hosting/wordpress ### Description This endpoint allows you to delete an existing WordPress installation from your hosting account. ### Method DELETE ### Endpoint https://api.planethoster.net/v4/hosting/wordpress ### Parameters #### Request Body - **id** (integer) - Required - The identification number (ID) of the hosting account. - **path** (string) - Required - The full path of the WordPress installation you wish to delete. ### Request Example ```json { "id": 2222, "path": "/home/myuser/public_html/wordpress" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of successful deletion. - **success** (boolean) - Indicates if the operation was successful. - **errors** (array) - An array of errors, if any occurred. - **reseller_id** (string) - The reseller ID associated with the account. #### Response Example ```json { "message": "Successfully deleted wordpress installation", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Delete CMS Installation Source: https://api.planethoster.com Removes an existing CMS installation from the specified path on the hosting account. ```APIDOC ## DELETE /hosting/cms ### Description Deletes an existing CMS installation from the specified path on the hosting account. ### Method DELETE ### Endpoint https://api.planethoster.net/v4/hosting/cms ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **path** (string) - Required - The installation path of the CMS to be deleted. ### Request Example ```json { "id": 2222 } ``` ### Responses #### Success Response (200) - **data** (object) - An empty object upon successful deletion. - **success** (boolean) - Indicates if the request was successful. - **errors** (array) - List of errors encountered. - **reseller_id** (string) - The reseller ID associated with the account. ### Response Example ```json { "data": {}, "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Successful Response for Listing Ruby Applications Source: https://api.planethoster.com This JSON response details the Ruby applications on the hosting account, including their root directory, Ruby version, URI, domain, and virtual environment activation command. ```json { "data": [ { "appRoot": "myapp_ruby", "version": "3.1", "uri": "ruby/new", "domain": "mydomain.com", "srcActive": "source /home/wrfqyfwe/rubyvenv/myapp__ruby/3.1/bin/activate" } ], "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Successful Hosting Account Creation Response Source: https://api.planethoster.com This is an example of a successful response when a hosting account is created. It includes details about the server and account credentials. ```json { "account_created": true, "server_hostname": "world-server.planethoster.com", "server_ip": "199.16.XX.XXX", "id": 2222, "username": "usernamexyz", "password": "XXXXXXXXXXXXXXX" } ``` -------------------------------- ### Create Hosting Account Source: https://api.planethoster.com Creates a new N0C account on the HybridCloud or The World hosting platform, allocating specified resources and optionally pre-installing a CMS. ```APIDOC ## POST /v4/hostings ### Description Creates a new N0C account on the HybridCloud or The World hosting platform, allocating specified resources and optionally pre-installing a CMS. ### Method POST ### Endpoint https://api.planethoster.net/v4/hostings ### Authorizations - X-API-KEY - X-API-USER ### Request Body schema application/json * **id** (integer) - Optional. The ID of a specific hosting account to retrieve. (Note: This parameter seems misplaced for a creation endpoint and might be a documentation error in the source. Typically, creation endpoints would expect parameters defining the new account, not an ID for retrieval.) (Further details on required fields for creating a hosting account, such as username, domain, package, resources, etc., are not provided in the source text.) ### Responses #### Success Response (200) (Details of the success response for account creation are not provided in the source text.) ``` -------------------------------- ### Delete WordPress Installation Response Source: https://api.planethoster.com This JSON object represents a successful response after deleting a WordPress installation, confirming the deletion. ```json { "message": "Successfully deleted wordpress installation", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Add New Database Source: https://api.planethoster.com Create a new database (MySQL or PostgreSQL) for a hosting account. Requires account ID and database name. The database type defaults to MySQL if not specified. ```json { "id": 2222 } ``` ```json { "message": "Successfully create database", "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Add Ruby Application Source: https://api.planethoster.com Create a new Ruby application on your hosting account. This endpoint allows you to define key details such as the application's root directory, associated domain, Ruby version, and URI path. ```APIDOC ## POST /hosting/ruby ### Description Create a new Ruby application on your hosting account. This endpoint allows you to define key details such as the application's root directory, associated domain, Ruby version, and URI path. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/ruby ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. This can be found with `/v4/the-world/info` for shared hosting and `/v4/hybridcloud/info` for dedicated hosting. - **appRoot** (string) - Required - The root directory of your Ruby application. - **domain** (string) - Required - The domain name of your application. - **uri** (string) - Optional - The URI path of your application. - **version** (string) - Required - The Ruby version to use for your application. ### Request Example ```json { "id": 2222, "appRoot": "/path/to/your/app", "domain": "yourdomain.com", "version": "3.1", "uri": "/your-app-path" } ``` ### Response #### Success Response (200) - **message** (string) - A success message. - **success** (boolean) - Indicates if the request was successful. - **errors** (array) - A list of errors, if any. - **reseller_id** (string) - The reseller ID. ### Response Example ```json { "message": "Successfully created Ruby application", "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Example Request Body: Create Node.js Application Source: https://api.planethoster.com This JSON payload is used to create a new Node.js application. It requires the hosting account ID, application root, domain, and Node.js version. Optional parameters include startup file, URI, and application mode. ```json { "id": 2222, "appRoot": "myapp", "domain": "mydomain.com", "startUpFile": "start.js", "uri": "node/new", "version": "20", "appMode": "development" } ``` -------------------------------- ### Example Response: Create Node.js Application Source: https://api.planethoster.com This JSON represents a successful response after creating a Node.js application. It indicates the result is 'success' and provides a timestamp and success status. ```json { "result": "success", "timestamp": 1727963354.9170904, "success": true, "errors": [ ], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` -------------------------------- ### Create Python Application Source: https://api.planethoster.com Creates a new Python application on your hosting account. This endpoint is used to set up a Python application with specified configurations. ```APIDOC ## POST /hosting/python ### Description Creates a new Python application on your hosting account. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/python ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. ### Request Example ```json { "id": 2222 } ``` ### Response #### Success Response (200) - **result** (string) - Indicates the status of the operation. - **timestamp** (number) - The time the request was processed. - **success** (boolean) - True if the operation was successful. - **errors** (array) - An array of errors, if any. - **reseller_id** (string) - The reseller ID associated with the account. #### Response Example ```json { "result": "success", "timestamp": 1727963354.9170904, "success": true, "errors": [], "reseller_id": "49gg39ed5888ee6bacebea8d8adab1e7" } ``` ``` -------------------------------- ### Install Custom SSL Certificate Source: https://api.planethoster.com Installs a custom SSL certificate for a specified domain by providing the necessary certificate and private key. This endpoint secures your domain with HTTPS. ```APIDOC ## POST /v4/hosting/domain/ssl/custom ### Description Installs a custom SSL certificate for a specified domain. Requires the certificate and its private key. ### Method POST ### Endpoint https://api.planethoster.net/v4/hosting/domain/ssl/custom ### Parameters #### Request Body - **id** (integer) - Required - The hosting account ID. - **domain** (string) - Required - The domain name for which the SSL certificate is to be installed. - **cert** (string) - Required - The SSL certificate in PEM format. - **key** (string) - Required - The private key associated with the SSL certificate in PEM format. ### Request Example * **Payload** ```json { "id": 2222, "domain": "example.com", "cert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----" } ``` * **curl** ```bash curl -X POST "https://api.planethoster.net/v4/hosting/domain/ssl/custom" \ -H "Content-Type: application/json" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "X-API-USER: YOUR_API_USER" \ -d '{ "id": 2222, "domain": "example.com", "cert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----" }' ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **errors** (array) - A list of errors, if any occurred. #### Response Example ```json { "success": true, "errors": [] } ``` ```