Retrieving Node.js Version on a Domain

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

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

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>

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:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.8.0">
  <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:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.8.0">
  <extension>
    <call>
      <result>
        <status>ok</status>
        <nodejs>
          <get-version>
            <version>4.4.7</version>
          </get-version>
        </nodejs>
      </result>
    </call>
  </extension>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.