• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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