• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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