• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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