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.

Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function sets the frequency of cPanel & WHM updates.

Examples 


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

Notes:

  • 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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "metadata":{  
      "version":1,
      "result":1,
      "command":"set_cpanel_updates",
      "reason":"Cpanel update frequency set to daily"
   },
   "data":{  
      "updates":"daily"
   }
}
 Output (XML)
<result>
    <data>
        <updates>daily</updates>
    </data>
    <metadata>
        <version>1</version>
        <reason>Cpanel update frequency set to daily</reason>
        <result>1</result>
        <command>set_cpanel_updates</command>
    </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
updatesstring

Required

The frequency with which to run cPanel & WHM updates on a server.

  • daily — Run updates daily.

  • manual — Run updates manually.
  • never — Never run updates.
daily

 

Returns

ReturnTypeDescriptionPossible valuesExample
updatesstringThe new frequency of server updates.
  • daily — Run updates daily.

  • manual — Run updates manually.
  • never — Never run updates.
daily