Getting Custom Buttons List

Each webspace has buttons available from the Control Panel. For example, Mail settings, File manager, etc. To get the list of all such buttons, send the cform_buttons_list request packet to the Panel.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet getting the list of webspace buttons includes the cform_buttons_list operation node:

<packet version="1.6.3.0">
<webspace>
   <cform_buttons_list>
   ...
   </cform_buttons_list>
</webspace>
</packet>

 

The cform_buttons_list node does not have a separate data type, it is nested within the complex type (domain_input.xsd). The cform_buttons_list node has the following graphics representation:

 

 

Response Packet Structure

The cform_buttons_list node of the response packet is structured as follows:

 

Buttons are described by complex type buttonDataType (plesk_common.xsd) as follows:

 

 

Samples

Getting buttons under Plesk Administrator

A sample request packet looks as follows:

<packet>
<webspace>
<cform_buttons_list>
   <filter>
      <id>1324</id>
   </filter>
</cform_buttons_list>
</webspace>
</packet>

Response:

<packet version="1.6.3.0">
<webspace>
<cform_buttons_list>
   <result>
      <status>ok</status>
      <filter-id>1324</filter-id>
      <id>1324</id>
        <button>
          <code>MAIL_DOMAIN_SETTINGS_BUTTON</code>
          <type>link_button</type>
          <name>Mail settings</name>
          <name_id>mail_domain_settings</name_id>
          <group_name>Mail</group_name>
          <group_name_id>mail</group_name_id>
          <href>/plesk/client@1/domain@13/mail/properties/?context=dashboard</href>
          <enabled>true</enabled>
          <new_window>false</new_window>
          <conhelp>Configure mail services on your domain.</conhelp>
          <icon_url/>
        </button>
   </result>
</cform_buttons_list>
</webspace>
</packet>

To filter some webspaces by id and others by name, use different operation nodes:

<packet>
<webspace>
<cform_buttons_list>
   <filter>
      <id>124</id>
   </filter>
</cform_buttons_list>
<cform_buttons_list>
   <filter>
      <name>techservice.co.uk</name>
   </filter>
</cform_buttons_list>
</webspace>
</packet>

To get buttons of all webspaces registered in Plesk, the following packet can be used:

<packet>
<webspace>
<cform_buttons_list>
   <filter/>
</cform_buttons_list>
</webspace>
</packet>