Child pages
  • WHM API 1 Functions - set_cpanel_updates
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.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 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