We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - update_updateconf
Skip to end of metadata
Go to start of metadata

Description

This function modifies a server's /etc/cpupdate.conf file.

 This file controls how the server handles software updates and upgrades.

Warnings:

  • You must authenticate as a root-level user to run this function.
  • We recommend that you run this function as a POST request with SSL enabled.

    • We deprecated WHM's Remote Access Key feature in cPanel & WHM version 64. We strongly recommend that you use API tokens instead.
    • The length of the remote access key may cause problems if you run the function with the GET method (for example, a URL in your browser).
    • You risk security problems if you enter a remote access key through the GET method.
  • This function will only update the parameters for which you specify a value.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/update_updateconf?api.version=1&UPDATES=daily
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/update_updateconf?api.version=1&UPDATES=daily
 Command Line
whmapi1 update_updateconf UPDATES=daily


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "update_updateconf"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>update_updateconf</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParametersTypeDescriptionPossible valuesExample
CPANELstring

The cPanel & WHM installation's release tier, or a valid version number.

If you do not use this parameter, the system retains the current setting.

Note:

New installations default to RELEASE.

  • A valid cPanel & WHM version number.
  • A valid release tier:
    • STABLE — This version has received considerable public exposure, testing, and verification.
    • RELEASE — This version is feature-complete and well-tested. It contains all intended features and functionality.

    • CURRENT — This version is tested and verified, but it may not contain all of the proposed functionality of a release. This tier is similar to the "release candidate" tier that other publication schemes use.
    • EDGE — This version only has rudimentary testing. The features are subject to further modification. This version usually lacks official public documentation.
    • LTS — Some hosting providers do not wish to upgrade cPanel & WHM to newer major versions. This is a single cPanel & WHM version for the year-long period in which cPanel, L.L.C. supports it.

Note:

We added the LTS value in cPanel & WHM version 88.

RELEASE
RPMUPstring

The frequency with which the server updates the operating system distribution's RPM packages each time that the /usr/local/cpanel/scripts/upcp script runs.

If you do not set this parameter, the system retains the current setting.

  • daily — Update the RPM packages daily.
  • manual — Update the RPM packages manually.
  • never If you specify never, the server administrator must run the /usr/local/cpanel/scripts/rpmup2 script when they update the server's RPM packages.

daily
SARULESUPstring

The frequency with which the server updates Apache SpamAssassin's™ rules when the /usr/local/cpanel/scripts/upcp script runs.

If you do not set this parameter, the system retains the current setting.

  • daily — Update Apache SpamAssassin rules daily.
  • manual — Update Apache SpamAssassin rules manually.
  • never — If you specify never, the server administrator must run the /usr/local/cpanel/scripts/rpmup2 script when they update Apache SpamAssassin's rules.


daily
UPDATESstring

When the system will check for updates.

If you do not set this parameter, the system retains the current setting.

  • daily — Update cPanel & WHM automatically through a cron job every night at midnight.
  • manual — Update cPanel & WHM manually.
  • never — Do not update cPanel & WHM.
daily
STAGING_DIR string

The staging directory for updates.

If you do not set this parameter, the system retains the current setting.

A valid absolute directory path. /usr/local/cpanel


 

Returns

This function only returns metadata.