UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function lists the Apache SpamAssassin™ settings for the account.
Note:
Additional customizations may appear in the returns. Form more information read the Apache SpamAssassin™ configuration file documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SpamAssassin/get_user_preferences
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SpamAssassin/get_user_preferences
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SpamAssassin/get_user_preferences{ "apiversion": 3, "func": "get_user_preferences", "module": "SpamAssassin", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function sets the Apache SpamAssassin™ settings for the account.
Note:
Additional customizations may appear in the function's return. For more information, read the Apache SpamAssassin configuration file documentation.
The variable that you want to manipulate.
scorerequired_scorewhitelist_fromblacklist_from- A custom SpamAssassin variable.
Important:
- You can only choose one of these possible values per call.
- If you enter a value for the
preferenceparameter, but you do not define a value for thevalueparameter, the function will remove any previous settings.
The value for the preference of the variable that you want to manipulate.
A valid SpamAssassin "
TEST_NAME SCORE" value when the value of thepreferenceparameter isscore, where:TEST_NAMErepresents the symbolic name of the test. For list of symbolic test names, run the UAPISpamAssassin::get_symbolic_test_namesfunction.SCORErepresents the floating-point value that SpamAssassin assigns to the mail when the test result is true. The score value must be greater than0, and less than1000.
A valid floating-point number if the value of the
preferenceparameter isrequired_score.A valid email address if the value of the
preferenceparameter iswhitelist_fromorblacklist_from.A custom SpamAssassin variable value.
Note:
To enter multiple values, increment the parameter name. For example, use the value-0 and value-1 parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SpamAssassin/update_user_preference
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SpamAssassin/update_user_preference
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SpamAssassin/update_user_preference?preference=score&value=ACT_NOW_CAPS+5.0'{ "apiversion": 3, "func": "update_user_preference", "module": "SpamAssassin", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }