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

 

Description

This function determines if your system requires a reboot.

Examples


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

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":"system_needs_reboot",
      "reason":"OK"
   },
   "data":{  
      "needs_reboot":0
	  "details": {
		  "kernel":"1"
      
   }
}
 Output (XML)
<result>
    <data>
        <needs_reboot>0</needs_reboot>
        <details>
			<Kernel>1</Kernel>
		</details>
    </data>
    <metadata>
        <command>system_needs_reboot</command>
        <reason>OK</reason>
        <result>1</result>
        <version>1</version>
    </metadata>
</result>

Note:

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

Parameters

This function does not accept parameters.

 

Returns

ReturnTypeDescriptionPossible ValuesExample
needs_rebootBooleanWhether the system requires a reboot.
  • 1 — System requires a reboot.
  • 0 — System does not require a reboot.
0
detailshashA hash that contains information about why the system requires a reboot.This hash contains the kernel return. 

kernel

Boolean

Whether the kernel requires reboot.

Note:

The function only returns this value if the kernel updated and requires a reboot.

  • 1 — Kernel requires a reboot.
  • 0  — Kernel does not require a reboot.
1