• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Command Line Interfase to SB anyone?

J

JRios

Guest
I am not too familiar with SB yet, i am looking for a way to auto create users con SB, perhpas as in PLESK by a command line, or in this case is it as simple as adding the user directable to the database table??? ... any help would be appreciated ! ;)
 
thanks....i e?

Thanks for the response, i can almost figure out what to do, care to give me and example? i mean how do i send that command? thru a web page? do i just put it in a http request? should i run it from the server? :( any help appreciated

BTW, i am using SB for Linux ...
 
SiteBuilder implements SOAP-based API (http://en.wikipedia.org/wiki/SOAP)

Here is the simple code that invokes CreateAccountWithNewPlan to create reseller. Note that in practice one should use a combination of CreatePlan and CreateAccountFull instead of CreateAccountWithNewPlan.

Code:
#!/usr/bin/env perl

use SOAP::Lite +trace => [ qw (all) ];

my $soap = SOAP::Lite
    -> proxy('http://sitebuilder.yourserver/ServiceFacade/AccountWebService.asmx')
    -> ns('http://swsoft.com/SiteBuilder/AccountService/v_3_2');

my @headers = (SOAP::Header->name("CredentialsSoapHeader" =>
                \SOAP::Data->value(
					SOAP::Header->name("Login" => "admin"),
					SOAP::Header->name("Password" => "admin")
                )
));
$headers[0]->uri("http://swsoft.com/SiteBuilder/AccountService/v_3_2");

my @data = (
        SOAP::Data->name("username", "test"),
        SOAP::Data->name("password", "test"),
        SOAP::Data->name("firstName", "john"),
        SOAP::Data->name("lastName", "doe"),
        SOAP::Data->name("email", '[email protected]'),
        SOAP::Data->name("role", "Reseller"),
);

$soap->CreateAccountWithNewPlan(@data, @headers);

You'll need sitebuilder-remote_admin package installed as well as perl with SOAP::Lite to run this code.
 
Back
Top