Disabling Node.js

Use the disable operation:

  • To disabe a Node.js version on the server (available to Administrator only),
  • To disable Node.js support on a domain.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

The request XML packet enabling a Node.js on the server or on a domain includes the disable operation node:

<packet>
  <extension>
    <call>
      <nodejs>
        <disable>
          ...
        </disable>
      </nodejs>
    </call>
  </extension>
</packet>

The disable node contains the following nodes:

  • The version node is optional. It specifies the Node.js version. Data type: string.
  • The domain node is optional. It specifies the domain name. Data type: string.
 

Response Packet Structure

The output XML packet is structured as follows:

<packet>
  <extension>
    <call>
      <result>
        <status>...</status>
        ...
        <nodejs>
          <disable/>
        </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 disable operation. Data type: result_status. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code when the disable operation fails. Data type: unsignedInt.
  • The errtext node is optional. It is used to return the error message if the disable operation fails. Data type: string.
  • The nodejs node is optional. It is present if the operation was completed successfully and contains the disable node.
 

Samples

This request XML packet disables Node.js version 6.3.1 support on the domain example.com:

<packet>
  <extension>
    <call>
      <nodejs>
        <disable>
          <version>6.3.1</version>
          <domain>example.com</domain>
        </disable>
      </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>
          <disable/>
        </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.