Reputation: 1457
As following documentation shows, a filter for a specific webspace-id is possible: http://download1.parallels.com/Plesk/PP10/10.1.1/Doc/en-US/online/plesk-api-rpc/index.htm?fileName=60842.htm
And it should also be possible to update the name (and hopefully the associated domain) with a "set" call, combined with a gen_setup node: http://download1.parallels.com/Plesk/PP10/10.1.1/Doc/en-US/online/plesk-api-rpc/index.htm?fileName=60842.htm
Logically tied together in my mind, i come out with following request xml:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.0">
<webspace>
<set>
<filter>
<id>114</id>
</filter>
<values>
<gen_setup>
<name>testing.com</name>
</gen_setup>
</values>
</set>
</webspace>
</packet>
but the server returns immediately "false"... so, how is it possible to only update the name of a webspace with plesk api rpc?
Upvotes: 0
Views: 567
Reputation: 1457
ok two things, you can only filter against fields that are known by gen_setup (so, id is not working, take name for example), and you have to include in every case the owner-id field in the gen_setup, even if you don't want to change that:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.0">
<webspace>
<set>
<filter>
<name>testing.ch</name>
</filter>
<values>
<gen_setup>
<name>testing.com</name>
<owner-id>1</owner-id>
</gen_setup>
</values>
</set>
</webspace>
</packet>
Upvotes: 1