• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Plesk Api PHP lib information

fferraro87

Basic Pleskian
Hi,

i'm using plesk api php lib in order to get all domains on my plesk server and their status (suspended, disable and so on).

My question is what's the difference between site and webspace?
because if i get all webspace, i've all domains on my plesk but if i get all site i've only subdomain.
So webspaces is only domains and sites only subdomains? and why i can't get status of webspaces?

Thanks
 
So why when i call getAll() method for site i've only subdomains? and with webspace i've all domains?
Thanks

webspace operator retrieves the list of primary (main) domains
site operator retrieves the list of non primary (additional) domains and subdomains

In your case getting only subdomains as a result of getAll() request might mean that you don't have any additional domains, only primary and their subdomains.
 
So
webspace operator retrieves the list of primary (main) domains
site operator retrieves the list of non primary (additional) domains and subdomains

In your case getting only subdomains as a result of getAll() request might mean that you don't have any additional domains, only primary and their subdomains.
Thanks but so i can't get status of primary domains? only for subdomains or non primary?
 
ok i've solved putting status property on \plesk\api-php-lib\src\Api\Struct\Webspace\GeneralInfo.php like this :
PHP:
<?php
// Copyright 1999-2019. Plesk International GmbH.

namespace PleskX\Api\Struct\Webspace;

class GeneralInfo extends \PleskX\Api\Struct
{
    /** @var string */
    public $name;

    /** @var string */
    public $guid;

    /** @var integer */
    public $realSize;

    /** @var string */
    public $status;

    public function __construct($apiResponse)
    {
        $this->_initScalarProperties($apiResponse, [
            'name',
            'guid',
            'real_size',
            'status',
        ]);
    }
}
 
Back
Top