|
@@ -78,6 +78,54 @@ class ApiClient {
|
|
|
return $this->sendRequest('POST', $url, $data);
|
|
return $this->sendRequest('POST', $url, $data);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Removes the development site for the customer
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param username: The username under which the domain is deployed
|
|
|
|
|
+ * @param domain: The Domain to migrate
|
|
|
|
|
+ * @param adminName: The Super-Admin User of the CRM System (usually the e-mail of the customer
|
|
|
|
|
+ * @param adminPassword: A self randomly generated password
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
|
|
|
+ * or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
|
|
|
+ *
|
|
|
|
|
+ * Attention: The given parameters username, adminName and adminPassword must be
|
|
|
|
|
+ * stored locally for the Single Sign on from whcms plugin
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+ public function undeployDev($username, $domain, $adminName, $adminPassword) {
|
|
|
|
|
+ $url = "$this->apiUrl/undeploydev/$username/$domain";
|
|
|
|
|
+ $data = [
|
|
|
|
|
+ 'admin_name' => $adminName,
|
|
|
|
|
+ 'admin_password' => $adminPassword
|
|
|
|
|
+ ];
|
|
|
|
|
+ return $this->sendRequest('POST', $url, $data);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Removes the productive site for the customer
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param username: The username under which the domain is deployed
|
|
|
|
|
+ * @param domain: The Domain to migrate
|
|
|
|
|
+ * @param adminName: The Super-Admin User of the CRM System (usually the e-mail of the customer
|
|
|
|
|
+ * @param adminPassword: A self randomly generated password
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
|
|
|
+ * or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
|
|
|
+ *
|
|
|
|
|
+ * Attention: The given parameters username, adminName and adminPassword must be
|
|
|
|
|
+ * stored locally for the Single Sign on from whcms plugin
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+ public function undeployProd($username, $domain, $adminName, $adminPassword) {
|
|
|
|
|
+ $url = "$this->apiUrl/undeployprod/$username/$domain";
|
|
|
|
|
+ $data = [
|
|
|
|
|
+ 'admin_name' => $adminName,
|
|
|
|
|
+ 'admin_password' => $adminPassword
|
|
|
|
|
+ ];
|
|
|
|
|
+ return $this->sendRequest('POST', $url, $data);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Migrate dev site to prod site
|
|
* Migrate dev site to prod site
|
|
|
*
|
|
*
|
|
@@ -116,10 +164,24 @@ class ApiClient {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Deletes the prod & dev webpages
|
|
|
|
|
|
|
+ * Creates a user and placeholder webpage
|
|
|
*
|
|
*
|
|
|
* @param username: The username under which the domain is deployed
|
|
* @param username: The username under which the domain is deployed
|
|
|
- * @param domain: The Domain to migrate
|
|
|
|
|
|
|
+ * @param domain: The Domain to delete
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
|
|
|
+ * or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
|
|
|
+ */
|
|
|
|
|
+ public function create($domain,$username) {
|
|
|
|
|
+ $url = "$this->apiUrl/create/$username/$domain";
|
|
|
|
|
+ return $this->sendRequest('GET', $url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Removes a user and placeholder webpage
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param username: The username under which the domain is deployed
|
|
|
|
|
+ * @param domain: The Domain to delete
|
|
|
*
|
|
*
|
|
|
* @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
* @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
|
* or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
* or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
@@ -129,6 +191,20 @@ class ApiClient {
|
|
|
return $this->sendRequest('GET', $url);
|
|
return $this->sendRequest('GET', $url);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Deletes the webpage (dev & prod)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param username: The username under which the domain is deployed
|
|
|
|
|
+ * @param domain: The Domain to delete
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return a json with ['status' => $httpCode,'response' => ['success' => 'Text']];
|
|
|
|
|
+ * or a json with ['status' => $httpCode,'response' => ['error' => 'Error-Description']];
|
|
|
|
|
+ */
|
|
|
|
|
+ public function delete($domain,$username) {
|
|
|
|
|
+ $url = "$this->apiUrl/delete/$username/$domain";
|
|
|
|
|
+ return $this->sendRequest('GET', $url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Enables the prod webpage
|
|
* Enables the prod webpage
|
|
|
*
|
|
*
|