Jump to content


Password error with config.set

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 FranHis

  • Members
  • 4 posts

Posted 01 May 2013 - 10:17 PM

The domain is created before that (thas verifies the $cudaAPIPass worked once).
Then I'm setting a few configuraiton valiables for the new domain:

$y0 = new xmlrpcval(
"password" => new xmlrpcval($cudaAPIPass, "string"),
"type" => new xmlrpcval("domain", "string"),
"path" => new xmlrpcval($newDomain, "string")
), "struct");
$y3 = new xmlrpcval(
"variable" => new xmlrpcval("auth_type", "string"),
"value" => new xmlrpcval("POP", "string"),
), "struct");
$m2 = new xmlrpcmsg('config.set');
$c2 = new xmlrpc_client("/cgi-mod/api.cgi?password=$cudaAPIPass", "$cudaServerIP", $cudaAPIPort);
echo "5- sending request to cuda on $cudaServerIP";echo "<br>\n";
$r2 = $c2->send($m2);
echo "6- result:";echo "<br>\n";

and I'm getting an error:

0- start
1- adding 1367460640domain.us to cuda on xxx.xxx.xxx.xxx
xml request: domain.add domain 1367460640domain.us
2- sending request to cuda on xxx.xxx.xxx.xxx
3- result:
Result 200: OK
4- building config for 1367460640domain.us to Barracuda on xxx.xxx.xxx.xxx
xml request: config.set password xxxxxxxxxxxx type domain path 1367460640domain.us variable auth_type value POP
5- sending request to Barracuda on xxx.xxx.xxx.xxx
6- result:
Code: 425
Reason: 'Config: Error: password does not belong to any class'

If I don't pass the password I get the error:
6- result:
faultStr Too few arguments: config.set: Missing variable values faultCode 400

I'm confused: why is it not accepting the value for the API Password ?
which "class" is is supposed to belong to?

The API doc says:
Use this method to set the values of variables in the system configuration. This method sets the variables(s) with the given values(s) for the object of type $type, identified by $path.
Parameters Allowed:The following variables are used by the config.set method and should be provided as part of the request XML in the HTTP POST request.
  • password :: A required parameter which the API uses to authenticate access to a page and which is set by your administrator.
  • type :: A required parameter that specifies the class/scope of an object.
  • path :: A required parameter that is the qualified name of an object for which the values are to be set.
  • variable list :: This is a required parameter that tells the API what variables are to be set and the corresponding values.
Plus I'm having trouble figuring how to pass the "Variable list"