Use the get-version node to retrieve the Node.js version on a domain.

Request Packet Structure

The request XML packet retrieving a Node.js version on a domain includes the get-version operation node:

<packet>
    <extension>
        <call>
            <nodejs>
                <get-version>
                    <domain>
                        ...
                    </domain>
                </get-version>
            </nodejs>
        </call>
    </extension>
</packet>

The get-version node contains the following nodes:

  • The domain node is required. It specifies the domain name. Data type: string.

Response Packet Structure

The output XML packet is structured as follows:

<packet>
    <extension>
        <call>
            <result>
                <status>ok</status>
                <nodejs>
                    <get-version>
                        <version>
                            ...
                        </version>
                    </get-version>
                </nodejs>
            </result>
        </call>
    </extension>
</packet>
  • The result node is required. It wraps the response received from the server. This node contains the following nodes:
    • The status node is required. It specifies the execution status of the get-version operation. Data type: result_status. Allowed values: ok | error.
    • The errcode node is optional. It is used to return the error code when the get-version operation fails. Data type: unsignedInt.
    • The errtext node is optional. It is used to return the error message if the get-version operation fails. Data type: string.
    • The nodejs node is optional. It is present if the operation was completed successfully and contains the get-version node that contains the following nodes:
      • The version node is required. It contains the version of Node.js on the domain.

Samples

This request XML packet retrieves the Node.js version on the domain example.com:

<packet>
    <extension>
        <call>
            <nodejs>
                <get-version>
                    <domain>example.com</domain>
                </get-version>
            </nodejs>
        </call>
    </extension>
</packet>

Response:

<packet>
    <extension>
        <call>
            <result>
                <status>ok</status>
                <nodejs>
                    <get-version>
                        <version>4.4.7</version>
                    </get-version>
                </nodejs>
            </result>
        </call>
    </extension>
</packet>