- Created by Documentation, last modified on Jul 03, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function sets the value of a non-volatile variable. cPanel NVData is a per-account configuration storage mechanism that you can use to maintain persistent cPanel & WHM settings across multiple sessions. This includes custom settings for your own themes.
Note:
We deprecated this function in cPanel & WHM version 74. Instead, we recommend that you use the WHM API 1 Functions - personalization_set function.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/nvset?api.version=1&key=ThermalDetonator&value=Active
https://hostname.example.com:2087/cpsess##########/xml-api/nvset?api.version=1&key=ThermalDetonator&value=Active
whmapi1 nvset key=ThermalDetonator value=Active
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
{ "data": { "nvdatum": [ { "value": "Active", "key": "ThermalDetonator" } ] }, "metadata": { "version": 1, "reason": "OK", "result": 1, "command": "nvset" } }
<result> <data> <nvdatum> <value>Active</value> <key>ThermalDetonator</key> </nvdatum> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>nvset</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
key | string | Required The variable's name. | A valid string. | ThermalDetonator |
value | string | Required The variable's value. | A valid string. | Active |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
nvdatum | array of hashes | An array of hashes of the variable's information. | This hash includes the data from the value and key returns. | |
| string | The variable's value. This function returns this value in the | A valid string. | Active |
| string | The variable's name. This function returns this value in the | A valid string. | ThermalDetonator |
Function information
API Version:
Available in:
WHM 11+
Methods:
GET, POST
Required Parameters:
key
, value
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - nvset — This function sets the value of a non-volatile variable.
-
Page:WHM API 1 Functions - nvget — This function retrieves the value of a non-volatile variable.
-
Page:WHM API 1 Functions - personalization_set — This function saves its data to an NVData file on disk.
-
Page:WHM API 1 Functions - nvset — This function sets the value of a non-volatile variable.
-
Page:WHM API 1 Functions - personalization_get — This function retrieves the data from an NVData file on disk.