The get-pool operator is used for retrieving a list of certificates for a particular domain or for all administrator’s domains.

Request Packet Structure

A request XML packet that retrieves a list of certificates should include the generate operation node:

<packet>
<certificate>
   <get-pool>
   ...
   </get-pool>
</certificate>
</packet>

The get-pool node does not have a separate data type, it is nested in type CertificateActionRequest (certificate_input.xsd). The node has the following graphical representation:

image 68402

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 optional. It is required if you retrieve a list of certificates for a particular domains.
  • The admin node is optional. It is required if you retrieve a list of Administrator’s certificates.

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

The get-pool node of the output XML packet is structured as follows:

image 68403

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 get-pool operation. Data type: result_status (common.xsd). Allowed values: ok|error.
    • The errcode node is required if the get-pool operation fails. It returns the error code. Data type: unsignedInt.
    • The errtext node is required if the get-pool operation fails. It returns the error message. Data type: string.
    • The filter-id node is optional. Data type: anySimple.
    • The id node is optional. Data type: id_type (common.xsd).
    • The certificates node is required if the get-pool operation succeeds. It specifies the names of appropriate certificates.

Samples

This packet retrieves a list of certificates associated with domain example.com.

<packet>
<certificate>
    <get-pool>
        <filter>
            <domain-name>example.com</domain-name>
        </filter>
    </get-pool>
</certificate>
</packet>

Response:

<packet>
  <certificate>
    <get-pool>
      <result>
        <status>ok</status>
        <certificates>
          <certificate>
            <name>default certificate</name>
          </certificate>
            ...
        </certificates>
      </result>
    </get-pool>
  </certificate>
</packet>

Note: Data structures that describe a number of properties are omitted to improve the readability of the sample.

This packet retrieves a list of certificates belonging to the Administrator.

<packet>
<certificate>
    <get-pool>
        <admin/>
    </get-pool>
</certificate>
</packet>