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 deploys the changes from a cPanel-managed repository.
Important:
The system logs messages for this function in the ~/.cpanel/logs/vc_TIMESTAMP_git_deploy.log file, where TIMESTAMP represents the time in Unix epoch time. The system pulls changes with the --ff-only option and will only succeed if the branch's HEAD commit is up-to-date or Git can fast forward it. For more information about our suggested deployment configuration and how users can set it up, read our Guide to Git™ - Deployment documentation. Before deployment, repositories must meet the following requirements:
- A valid checked-in
.cpanel.ymlfile in the top-level directory. - One or more local or remote branches.
- A clean working tree.
If a repository does not meet these requirements, the system will not display deployment information. Also, it will disable deployment functionality. For more information, read our Guide to Git™ - Deployment documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/VersionControlDeployment/create
- A server running cPanel.
https://cpanel-server.tld:2083/execute/VersionControlDeployment/create
- 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/VersionControlDeployment/create?repository_root=%2Fhome%2Fuser%2Fpublic_html%2Fexample'{ "apiversion": 3, "func": "create", "module": "VersionControlDeployment", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes a deployment task. For more information, read our Guide to Git - Deployment documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/VersionControlDeployment/delete
- A server running cPanel.
https://cpanel-server.tld:2083/execute/VersionControlDeployment/delete
- 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/VersionControlDeployment/delete?deploy_id=13'{ "apiversion": 3, "func": "delete", "module": "VersionControlDeployment", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function retrieves the status of deployment tasks. Before deployment, repositories must meet the following requirements:
- A valid checked-in
.cpanel.ymlfile in the top-level directory. - One or more local or remote branches.
- A clean working tree.
If a repository does not meet these requirements, the system will not display deployment information. Also, it will disable deployment functionality. For more information, read our Guide to Git™ - Deployment documentation.
Important:
The system logs messages for this function in the ~/.cpanel/logs/vc_TIMESTAMP_git_deploy.log file, where TIMESTAMP represents the time in Unix epoch time.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/VersionControlDeployment/retrieve
- A server running cPanel.
https://cpanel-server.tld:2083/execute/VersionControlDeployment/retrieve
- 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/VersionControlDeployment/retrieve{ "apiversion": 3, "func": "retrieve", "module": "VersionControlDeployment", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }