Each site 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.

Request Packet Structure

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

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

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

image 66618

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • filter, required

    It indicates sites whose buttons are requested. Data type: siteFilterType (site.xsd). To see the structure of this node, proceed to topic Available Filters.

Response Packet Structure

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

image 66622

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • result, optional

  • It wraps the result of the requested cform_buttons_list operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (common.xsd).

  • status, required

    It returns the execution status of the cform_buttons_list operation. Data type: string. Allowed values: ok | error.

  • errcode, optional

    It is used to return an error code if the cform_buttons_list operation fails. Data type: unsignedInt.

  • errtext, optional

    Can be used to return an error message if the cform_buttons_list operation fails. Data type: string.

  • filter-id, optional

    If supported, it is always present and used to return the parameter by which the site was filtered by in the request packet. Data type: anySimple.

  • id, optional

    Returns the identifier of the site whose buttons are requested. It is missing if the request packet fails before the validation on the server side. Data type: integer.

  • button, optional

    It returns a collection of parameters that describe the button (see the details below). It is missing if the request packet fails before the validation on the server side. Data type: buttonDataType (plesk_common.xsd).

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

image 66623

  • code, required

    It returns the identifier of the button. Data type: string.

  • type, required

    It specifies the button type. Data type: string. Allowed values: link_button (a typical link that references some URL) | comm_button (a typical button whose click event calls a related event handler).

  • name, required

    It contains the localized button name displayed in a home page. Data type: string.

  • name_id, required

    It specifies the localization key associated with the button. Data type: string.

  • group_name, required

    It returns the localized name of the group containing the button. Data type: string.

  • group_name_id, required

    It specifies the localization key of the group name. Data type: string.

  • href, required

    It returns the URL referenced by the button. Data type: string.

  • js_onclick, optional

    It returns the JavaScript code executed at the button click. Data type: text (string, white spaces are allowed ).

  • enabled, required

    It indicates whether the button in enabled. If true, the button is active and can be used. Data type: Boolean.

  • new_window, optional

    It indicates whether a new window should be opened in the browser when the button is clicked. Data type: Boolean.

  • tabindex, optional

    It returns the button’s tabulation index. Data type: integer. Default value: 0.

  • conhelp_id, optional

    It specifies the localization key of the context help message associated with the button. Data type: string.

  • conhelp, optional

    It returns a context help message displayed in the Help section of the Plesk navigation pane when pointing at the button with a mouse. Data type: text (string, white spaces are allowed ).

  • icon_url, optional

    It specifies the location of the button’s icon. Data type: string.

Samples

This packet contains different filtering rules to remove sites:

<packet version="1.6.3.0">
<site>
   <cform_buttons_list>
     <filter>
       <id>19</id>
     </filter>
   </cform_buttons_list>
</site>
</packet>

This packet requests to remove all sites owned by a packet sender:

<packet version="1.6.3.0">
<site>
<del>
   <filter/>
</del>
</site>
</packet>