Website administration functions

getList

Description:

Method returns website list. If domains are linked to website, they will also be returned.

Call example:
https://api.beget.de/api/site/getList?login=userlogin&
passwd=password&output_format=json
Response example:
[
   {
      "id":"125",
      "path":"site.de\/public_html",
      "domains":[
         {
            "id":"12345",
            "fqdn":"site.de"
         }
      ]
   },
   {
      "id":"124",
      "path":"facebook.com\/public_html",
      "domains":[
 
      ]
   },
   {
      "id":"123",
      "path":"mysite\/public_html",
      "domains":[
 
      ]
   }
]

ID - the website id is unique within one user.

add

Description:

Method creates new website with given name.

Additional parameters
  • name - name of directory with website (например, site.de);
Call example:
// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/site/add?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"name":"site.de"}

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/site/add?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22name%22%3A%22site.de%22%7D
Response example:
 true

Returns property of successful or unsuccessful execution. In case of a successful response the full path to directory with website will be name/public_html.

delete

Description:

Method deletes website. If domains were linked to the website, they will be unlinked from it.

Additional parameters
  • id - webiste id, type int;
Call example:
// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/site/delete?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"id":10}

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/site/delete?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22id%22%3A10%7D
Response example:
 true

Returns property of successful or unsuccessful execution.

linkDomain

Description:

Method links domain to website.

Additional parameters
  • domain_id - domain id, you can receive the unique domain id via the function domain/getList;
  • site_id - id сайта.
Call example:
// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/site/linkDomain?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"domain_id":100,"site_id":10}

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/site/linkDomain?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22domain_id%22%3A100%2C%22site_id%22%3A10%7D
Response example:
 true

Returns property of successful or unsuccessful execution. Upon operation performance, the website will begin to open under the domain name within 5-10 minutes.

unlinkDomain

Description:

Method unlinks domain.

Additional parameters
  • domain_id - domain id, you can receive the unique domain id via the function domain/getList;
Call example:
// for illustration purposes input_data is presented in uncoded form
https://api.beget.de/api/site/unlinkDomain?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data={"domain_id":100}

// correct call example, input_data is coded with urlencode
https://api.beget.de/api/site/unlinkDomain?login=userlogin&
passwd=password&input_format=json&output_format=json&
input_data=%7B%22domain_id%22%3A100%7D
Response example:
 true

Returns property of successful or unsuccessful execution.