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/
The access token to connect to the provider.
The items to add to the shopping cart.
Note:
The value is a JSON string.
This object has one required key, product_id, which is a string.
The other keys/values in this object vary depending on the provider.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Market/create_shopping_cart
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Market/create_shopping_cart
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Market \
create_shopping_cart \
provider='cPStore' \
access_token='1a676e6f-99fc-11e6-9ab6-e60a769b73bc' \
url_after_checkout='http://www.example.com/thenextplace' \
item='{"product_id":123456,"provider-specfic-key":"provider-specfic-value","another-provider-specfic-key":"another-provider-specfic-value"}' item='{"product_id":123457,"provider-specfic-key":"provider-specfic-value","another-provider-specfic-key":"another-provider-specfic-value"}'{ "apiversion": 3, "func": "create_shopping_cart", "module": "Market", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Market/get_all_products
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Market/get_all_products
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Market \
get_all_productsproduct_group=ssl_certificate
{ "apiversion": 3, "func": "get_all_products", "module": "Market", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Market/get_login_url
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Market/get_login_url
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Market \
get_login_url \
provider='cPStore' \
url_after_login='http://hostname.example.com/redirectionlocation.cgi?state'{ "apiversion": 3, "func": "get_login_url", "module": "Market", "result": { "data": "https://example.com/api/?client_id=MyHearseIsAmazing&function=login&module=bogoSSL&redirect_uri=https%3A%2F%2Fqaportal.cpanel.net%2Fbogus.cgi&response_type=token", "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }