The cform-buttons-list operation is used to retrieve a list of buttons displayed on a reseller’s home page.

Request Packet Structure

A request XML packet getting a list of buttons for a specified reseller account includes the cform-buttons-list operation node:

<packet version="1.6.0.0">
<reseller>
   <cform-buttons-list>
   ...
   </cform-buttons-list>
</reseller>
</packet>

The cform-buttons-list operation node has the following graphical representation:

image 60417

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.

  • The filter node is required. It specifies reseller accounts whose lists of buttons are to be displayed. Data type: ResellerSelectionFilter. To view the structure of this node, refer to the Available Filters section.

Response Packet Structure

A response cform-buttons-list packet is structured as follows:

image 60592

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.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (common.xsd).
    • The status node is required. It specifies the execution status of the cform-buttons-list operation. Data type: result_status (common.xsd). Allowed values: ok|error.
    • The errcode node is required if the cform-buttons-list operation fails. It returns the error code. Data type: unsignedInt.
    • The errtext node is required if the cform-buttons-list operation fails. It returns the error message. Data type: string.
    • The filter-id node is required. It returns parameter by which the reseller account was filtered in the request packet. Data type: anySimple.
    • The id node is required if the operation succeeds, or if the results are filtered by ID. It returns ID of the reseller account which list of buttons was returned. Data type: id_type (common.xsd).
    • The button node is required if the cform-buttons-list operation succeeds. It returns information on each displayed reseller’s button. Data type: buttonDataType ( plesk_button.xsd ). View the structure of this node below.

The button node is structured as follows:

image 60423

  • The code node is required. It specifies button ID. Data type: string.
  • The type node is required. It specifies button type (a button pointing to a URL, or a button linked to a Web application). Data type: string. Allowed values: link_button | comm_button.
  • The name node is required. It specifies localized button caption displayed in Plesk GUI. Data type: string.
  • The name_id node is required. It specifies localization key of the button name. Data type: string.
  • The group_name node is required. It specifies localized name of the section in which the button is located in Plesk GUI. Data type: string.
  • The group_name_id node is required. It specifies localization key of the section name. Data type: string.
  • The href node is required. It specifies URL referenced by a button. Data type: string.
  • The js_onclick node is optional. It specifies JavaScript code executed at the button click. Data type: text.
  • The enabled node is required. It specifies button status. Data type: boolean.
  • The new_window node is optional. It indicates whether a new window is to be opened at the button click. Data type: boolean.
  • The tabindex node is optional. It specifies tabulation index of the button. Data type: integer. Default value: 0.
  • The conhelp_id node is optional. It specifies localization key of contextual help message associated with the button. Data type: string.
  • The conhelp node is optional. It specifies contextual help message displayed for the button. Data type: text.
  • The icon_url node is optional. It specifies URL of the button’s icon. Data type: string.

Samples

To view lists of buttons for all reseller accounts, specify the packet as follows:

<packet version="1.6.0.0">
<reseller>
   <cform-buttons-list>
      <filter>
         <all/>
      </filter>
   </cform-buttons-list>
</reseller>
</packet>

Response:

<packet version="1.6.0.0">
  <reseller>
    <cform-buttons-list>
      <result>
        <status>ok</status>
        <filter-id>156</filter-id>
        <id>156</id>
        <button>
          <code>NEW_CLIENT_BUTTON</code>
...
        </button>
      </result>
    </cform-buttons-list>
  </reseller>
</packet>