Save data to NVData file

This function is used to save personalization data for a WHM user to a datastore on disk.

We call this system cPanel NVData.

cPanel NVData is a per-login configuration storage mechanism that you can use to maintain persistent user interface settings across multiple sessions.

This includes custom settings for your own themes and plugins.

This function is used to save personalzation data for WHM users only. If you want to save personalization data for cPanel users, use the UAPI function personalization_set.

Authorizations:
Request Body schema: application/json
api.version
required
integer

The WHM API version number

Value: 1
personalization
required
object

An object you want to store.

property name*
string <= 128 characters

Provide the username in the property name and the datastore name is the value.

Responses

Response Schema: application/json
object
object

Request samples

Content type
application/json
{
  • "api.version": 1,
  • "personalization": {
    • "coffee": "hot",
    • "milk": "cold"
    },
  • "root": "beverages"
}

Response samples

Content type
application/json
{
  • "data": {
    • "personalization": {
      • "coffee": {
        • "reason": "OK",
        • "success": 1,
        • "value": "hot"
        },
      • "milk": {
        • "reason": "OK",
        • "success": 1,
        • "value": "cold"
        }
      }
    },
  • "metadata": {
    • "command": "personalization_set",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}