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

 

Description

This function retrieves the value of a non-volatile environment variable.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/nvget?key=ThermalDetonator
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/nvget?key=ThermalDetonator
 Command Line
whmapi0 nvget key=ThermalDetonator

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "value":"ThermalDetonator"
}
 Output (XML)
<nvget>
     <value>ThermalDetonator</value>
</nvget>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
keystring

The variable's name.

A valid string.

ThermalDetonator

 

Returns

ReturnTypeDescriptionPossible valuesExample
nvgethash

A hash of the variable value.

This hash includes the value return. 

value

string

The variable's value.

The function returns this value in the nvget hash.

A valid string.

ThermalDetonator