Description
This function creates a non-volatile datastore. The system creates the datastore in the /home/user/.cpanel/nvdata
directory, where user
represents the account name.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
datastore name Note: The NVData file to create. In the examples, we set it to mymind. |
string |
Required The NVData file's value. |
A valid string. |
you |
Returns
The function creates the datastore in the /home/user/.cpanel/nvdata
directory.
Return |
Type |
Description |
Possible values |
Example |
set |
string |
The datastore's name. |
A valid string. |
mymind |
reason |
string |
A reason for failure. Note: This function only returns a reason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |