- Created by Documentation, last modified on Sep 18, 2018
Backup:: fullbackup_to_ftp
Backup:: fullbackup_to_homedir
Backup:: fullbackup_to_scp_with_key
Backup:: fullbackup_to_scp_with_password
Backup:: list_backups
Batch:: strict
Brand:: read
Branding:: file
Branding:: get_applications
Branding:: get_application_information
Branding:: get_available_applications
Branding:: get_information_for_applications
Branding:: image
Branding:: include
Branding:: spritelist
Chkservd:: get_exim_ports
Chkservd:: get_exim_ports_ssl
Chrome:: get_dom
Contactus:: is_enabled
cPGreyList:: disable_all_domains
cPGreyList:: disable_domains
cPGreyList:: enable_all_domains
cPGreyList:: enable_domains
cPGreyList:: has_greylisting_enabled
cPGreyList:: list_domains
DomainInfo:: domains_data
DomainInfo:: list_domains
DomainInfo:: main_domain_builtin_subdomain_aliases
DomainInfo:: single_domain_data
DNSSEC:: disable_dnssec
DNSSEC:: enable_dnssec
DNSSEC:: fetch_ds_records
DNSSEC:: set_nsec3
DNSSEC:: unset_nsec3
Email:: account_name
Email:: add_auto_responder
Email:: add_domain_forwarder
Email:: add_forwarder
Email:: add_list
Email:: add_mailman_delegates
Email:: add_mx
Email:: add_pop
Email:: add_spam_filter
Email:: browse_mailbox
Email:: change_mx
Email:: check_fastmail
Email:: check_pipe_forwarder
Email:: delete_auto_responder
Email:: delete_domain_forwarder
Email:: delete_filter
Email:: delete_forwarder
Email:: delete_held_messages
Email:: delete_list
Email:: delete_mx
Email:: delete_pop
Email:: disable_filter
Email:: disable_mailbox_autocreate
Email:: disable_spam_assassin
Email:: disable_spam_autodelete
Email:: disable_spam_box
Email:: dispatch_client_settings
Email:: edit_pop_quota
Email:: enable_filter
Email:: enable_mailbox_autocreate
Email:: enable_spam_assassin
Email:: enable_spam_box
Email:: fetch_charmaps
Email:: fts_rescan_mailbox
Email:: generate_mailman_otp
Email:: get_auto_responder
Email:: get_charsets
Email:: get_client_settings
Email:: get_default_email_quota
Email:: get_default_email_quota_mib
Email:: get_disk_usage
Email:: get_filter
Email:: get_held_message_count
Email:: get_mailbox_autocreate
Email:: get_mailman_delegates
Email:: get_main_account_disk_usage
Email:: get_main_account_disk_usage_bytes
Email:: get_max_email_quota
Email:: get_max_email_quota_mib
Email:: get_pop_quota
Email:: get_spam_settings
Email:: get_webmail_settings
Email:: has_delegated_mailman_lists
Email:: has_plaintext_authentication
Email:: hold_outgoing
Email:: is_integer
Email:: list_auto_responders
Email:: list_default_address
Email:: list_domain_forwarders
Email:: list_filters
Email:: list_filters_backups
Email:: list_forwarders
Email:: list_forwarders_backups
Email:: list_lists
Email:: list_mail_domains
Email:: list_mxs
Email:: list_pops
Email:: list_pops_with_disk
Email:: list_system_filter_info
Email:: passwd_list
Email:: passwd_pop
Email:: release_outgoing
Email:: remove_mailman_delegates
Email:: reorder_filters
Email:: set_always_accept
Email:: set_default_address
Email:: set_list_privacy_options
Email:: stats_db_status
Email:: store_filter
Email:: suspend_incoming
Email:: suspend_login
Email:: suspend_outgoing
Email:: trace_filter
Email:: unsuspend_incoming
Email:: unsuspend_login
Email:: unsuspend_outgoing
Email:: verify_password
EmailAuth:: disable_dkim
EmailAuth:: enable_dkim
EmailAuth:: ensure_dkim_keys_exist
EmailAuth:: fetch_dkim_private_keys
EmailAuth:: install_dkim_private_keys
EmailAuth:: install_spf_records
EmailAuth:: validate_current_dkims
EmailAuth:: validate_current_ptrs
EmailAuth:: validate_current_spfs
ExternalAuthentication:: add_authn_link
ExternalAuthentication:: configured_modules
ExternalAuthentication:: get_authn_links
ExternalAuthentication:: has_external_auth_modules_configured
ExternalAuthentication:: remove_authn_link
Features:: has_feature
Features:: list_features
Fileman:: autocompletedir
Fileman:: empty_trash
Fileman:: get_file_content
Fileman:: get_file_information
Fileman:: list_files
Fileman:: save_file_content
Fileman:: transcode
Fileman:: upload_files
Ftp:: add_ftp
Ftp:: allows_anonymous_ftp
Ftp:: allows_anonymous_ftp_incoming
Ftp:: delete_ftp
Ftp:: ftp_exists
Ftp:: get_ftp_daemon_info
Ftp:: get_port
Ftp:: get_quota
Ftp:: get_welcome_message
Ftp:: kill_session
Ftp:: list_ftp
Ftp:: list_ftp_with_disk
Ftp:: list_sessions
Ftp:: passwd
Ftp:: server_name
Ftp:: set_anonymous_ftp
Ftp:: set_anonymous_ftp_incoming
Ftp:: set_homedir
Ftp:: set_quota
Ftp:: set_welcome_message
Integration:: fetch_url
LangPHP:: php_get_domain_handler
LangPHP:: php_get_impacted_domains
LangPHP:: php_get_installed_versions
LangPHP:: php_get_system_default_version
LangPHP:: php_get_vhost_versions
LangPHP:: php_ini_get_user_basic_directives
LangPHP:: php_ini_get_user_content
LangPHP:: php_ini_get_user_paths
LangPHP:: php_ini_set_user_basic_directives
LangPHP:: php_ini_set_user_content
LangPHP:: php_set_vhost_versions
LastLogin:: get_last_or_current_logged_in_ip
Locale:: get_attributes
Mailboxes:: expunge_mailbox_messages
Mailboxes:: expunge_messages_for_mailbox_guid
Mailboxes:: get_mailbox_status
Mailboxes:: has_utf8_mailbox_names
Mailboxes:: set_utf8_mailbox_names
Market:: cancel_pending_ssl_certificate
Market:: create_shopping_cart
Market:: get_all_products
Market:: get_certificate_status_details
Market:: get_login_url
Market:: get_pending_ssl_certificates
Market:: get_provider_specific_dcv_constraints
Market:: get_providers_list
Market:: get_ssl_certificate_if_available
Market:: process_ssl_pending_queue
Market:: request_ssl_certificates
Market:: set_status_of_pending_queue_items
Market:: set_url_after_checkout
Market:: validate_login_token
Mime:: add_handler
Mime:: add_hotlink
Mime:: add_mime
Mime:: add_redirect
Mime:: delete_handler
Mime:: delete_hotlink
Mime:: delete_mime
Mime:: delete_redirect
Mime:: list_handlers
Mime:: list_hotlinks
Mime:: list_mime
Mime:: list_redirects
Mime:: redirect_info
ModSecurity:: disable_all_domains
ModSecurity:: disable_domains
ModSecurity:: enable_all_domains
ModSecurity:: enable_domains
ModSecurity:: has_modsecurity_installed
ModSecurity:: list_domains
Mysql:: add_host
Mysql:: add_host_note
Mysql :: check_database
Mysql:: create_database
Mysql:: create_user
Mysql:: delete_database
Mysql:: delete_host
Mysql:: delete_user
Mysql:: get_host_notes
Mysql:: get_privileges_on_database
Mysql:: get_restrictions
Mysql:: get_server_information
Mysql:: locate_server
Mysql:: rename_database
Mysql:: rename_user
Mysql:: repair_database
Mysql:: revoke_access_to_database
Mysql:: set_password
Mysql:: set_privileges_on_database
Notifications:: get_notifications_count
Parser:: firstfile_relative_uri
PassengerApps:: disable_application
PassengerApps:: edit_application
PassengerApps:: enable_application
PassengerApps:: list_applications
PassengerApps:: register_application
PassengerApps:: unregister_application
PasswdStrength:: get_required_strength
Postgresql:: create_database
Postgresql:: create_user
Postgresql:: delete_database
Postgresql:: get_restrictions
Postgresql:: grant_all_privileges
Postgresql:: rename_database
Postgresql:: rename_user
Postgresql:: rename_user_no_password
Postgresql:: revoke_all_privileges
Postgresql:: set_password
Pushbullet:: send_test_message
Quota:: get_quota_info
Resellers:: list_accounts
ResourceUsage:: get_usages
Session:: create_temp_user
SpamAssassin :: clear_spam_box
SpamAssassin:: get_symbolic_test_names
SpamAssassin:: get_user_preferences
SpamAssassin:: update_user_preference
SSH:: get_port
SSL:: add_autossl_excluded_domains
SSL:: check_shared_cert
SSL:: delete_cert
SSL:: delete_csr
SSL:: delete_key
SSL:: delete_ssl
SSL :: disable_mail_sni
SSL:: enable_mail_sni
SSL:: fetch_best_for_domain
SSL:: fetch_cert_info
SSL:: fetch_certificates_for_fqdns
SSL:: fetch_key_and_cabundle_for_certificate
SSL:: find_certificates_for_key
SSL:: find_csrs_for_key
SSL:: generate_cert
SSL:: generate_csr
SSL:: generate_key
SSL:: get_autossl_excluded_domains
SSL:: get_autossl_pending_queue
SSL:: get_autossl_problems
SSL:: get_cabundle
SSL:: get_cn_name
SSL:: install_ssl
SSL:: installed_host
SSL:: installed_hosts
SSL:: is_autossl_check_in_progress
SSL:: is_mail_sni_supported
SSL:: is_sni_supported
SSL:: list_certs
SSL:: list_csrs
SSL:: list_keys
SSL:: list_ssl_items
SSL:: mail_sni_status
SSL:: rebuild_mail_sni_config
SSL:: rebuildssldb
SSL:: remove_autossl_excluded_domains
SSL:: set_autossl_excluded_domains
SSL:: set_cert_friendly_name
SSL:: set_csr_friendly_name
SSL:: set_key_friendly_name
SSL:: set_primary_ssl
SSL:: set_ssl_share
SSL:: show_cert
SSL:: show_csr
SSL:: show_key
SSL:: start_autossl_check
SSL:: upload_cert
SSL:: upload_key
StatsBar:: get_stats
SubDomain:: addsubdomain
TwoFactorAuth:: generate_user_configuration
TwoFactorAuth:: get_user_configuration
TwoFactorAuth:: remove_user_configuration
TwoFactorAuth:: set_user_configuration
UserManager:: check_account_conflicts
UserManager:: create_user
UserManager:: delete_user
UserManager:: dismiss_user
UserManager:: edit_user
UserManager:: list_users
UserManager:: lookup_service_account
UserManager:: lookup_user
UserManager:: merge_service_account
UserManager:: unlink_service_account
WebmailApps:: listwebmailapps
WebVhost:: list_domains
WebVhost:: list_ssl_capable_domains
WordPressBackup:: any_running
WordPressBackup:: cancel
WordPressBackup:: cleanup
WordPressBackup:: get_available_backups
WordPressBackup:: is_running
WordPressBackup:: start
WordPressInstanceManager:: cancel_scan
WordPressInstanceManager:: cleanup_scan
WordPressInstanceManager:: change_admin_password
WordPressInstanceManager:: configure_autoupdate
WordPressInstanceManager:: get_api_version
WordPressInstanceManager:: get_instance_by_id
WordPressInstanceManager:: get_instances
WordPressInstanceManager:: get_latest_wordpress_version_from_wordpress_org
WordPressInstanceManager:: get_scan_results
WordPressInstanceManager:: is_installable_addon_available
WordPressInstanceManager:: start_scan
Description
This function lists Git™ repositories on a cPanel account. For more information about support for version control in cPanel & WHM, read our Git Version Control and Guide to Git documentation.
Important:
This feature does not allow the following characters in repository paths:
\ * | " ' < > & @ ` $ { } [ ] ( ) ; ? : = % #
This function does not allow repositories that exist in the following cPanel-controlled directories:
Click to view....cpanel
.cphorde
.htpasswds
.ssh
.trash
access-logs
cgi-bin
etc
logs
perl5
mail
spamassassin
ssl
tmp
var
Users can create repositories in some of these directories on the command line. They may appear in the list of repositories in Gitweb, but users may see an error message if they try to access them.
Examples
https://hostname.example.com:2083/cpsess##########/execute/VersionControl/retrieve?fields=name,type,branch,last_update
Note:
This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation.
$cpanel = new CPANEL(); // Connect to cPanel - only do this once. // List the account's repositories. $templates = $cpanel->uapi( 'VersionControl', 'retrieve', array( 'fields' => 'name,type,branch,last_update', ) );
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once. # List the account's repositories. my $templates = $cpliveapi->uapi( 'VersionControl', 'retrieve', { 'fields' => 'name,type,branch,last_update', } );
<!-- List the account's repositories. --> [% execute( 'VersionControl', 'retrieve', { 'fields' => 'name,type,branch,last_update' } ); %]
uapi --user=username VersionControl retrieve fields=name,type,branch,last_update
Notes:
- You must URI-encode values.
username
represents your account-level username.- For more information and additional output options, read our Guide to UAPI documentation or run the
uapi --help
command. If you run CloudLinux™, you must use the full path of the
uapi
command:/usr/local/cpanel/bin/uapi
{ "errors":null, "metadata":{ "transformed":1 }, "status":1, "data":[ { "name":"example", "type":"git", "repository_root":"/home/user/example", "branch":"master", "deployable":"1", "available_branches": [ "master" ], "last_update": { "date": "1410277881", "identifier": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", "author": "Jane Doe <jane.doe@example.com>", "message": "I'm committing some particularly cromulent code." }, "last_deployment": { "deployment_date": "1410277881", "repository_state": { "date": "1410277881", "identifier": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", "author": "User Name <user.name@example.com>", "message": "I'm committing some particularly cromulent code." } }, "clone_urls":{ "read_write":[ "ssh://user@example.com/home/user/example" ], "read_only":[ "https://user@example.com/home/user/example" ] }, "tasks": [ { "id": "00000000/5a9ec8dd4c345d", "subsystem": "VersionControl", "action": "create" "sse_url": "/sse/UserTasks/B3A27B96-51F7-11E8-92E3-CC90C4F823F0" "args": { "repository_root": "/home/user/example" "log_file": "/home/user/.cpanel/logs/vc_1526305129.123456_git_create.log" } } ] }, { "name":"example2", "type":"git", "repository_root":"/home/user/example2", "branch":"master", "deployable":"1", "available_branches": [ "master" ], "last_update": { "date": "1410277881", "identifier": "4ee0b73ddf78213c41fcc185acfab68ced99046d", "author": "June Due <june.due@example2.com>", "message": "My code makes more sense, actually." }, "last_deployment": { "deployment_date": "1410277881", "repository_state": { "date": "1410277881", "identifier": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", "author": "User Name <user.name@example.com>", "message": "I'm committing some particularly cromulent code." } }, "clone_urls":{ "read_write":[ "ssh://user@example.com/home/user/example" ], "read_only":[ "https://user@example.com/home/user/example" ] }, "tasks": [ { "id": "00000000/5a9ec8dd4c345d", "subsystem": "VersionControl", "action": "create" "sse_url": "/sse/UserTasks/B3A27B96-51F7-11E8-92E3-CC90C4F823F0" "args": { "repository_root": "/home/user/example" "log_file": "/home/user/.cpanel/logs/vc_1526305129.123456_git_create.log" } } ] }, ], "messages":null }
Note:
Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
fields | string | A list of desired return values. This parameter defaults to |
| name,type,branch,last_update |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
| hash | An unnamed hash of repository data. | This hash includes the type , repository_root , branch , and name returns, the available_branches array, and the last_update , source_repository , and clone_urls hashes. | |
| string | The repository's display name. The function returns this value in the repository's hash. | A valid string. | example |
| string | The repository type. The function returns this value in the repository's hash. | git is the only possible value. | git |
| string | The directory that contains the repository. The function returns this value in the repository's hash. | A valid absolute path to a directory that exists within the user's home directory. |
|
| string | The repository's current branch. The function returns this value in the repository's hash. |
| master
|
| Boolean | Whether the system could deploy the repository. Note: We added this return in cPanel & WHM version 74. |
| 1 |
| hash | A hash of information about the source repository. Note: The function only returns this hash if you cloned a source repository. The function returns this hash in the repository's hash. | This hash contains the Important: You must JSON-encode the contents of this hash. | |
| JSON string | The source repository's name. The function returns this value in the | A valid JSON-encoded string. | origin |
| JSON string | The source repository's clone URL. Note: If you include the The function returns this value in the | A valid JSON-encoded clone URL. | ssh://clone.domain.com/cloneme |
| array of strings | An array of available branches for the repository. The function returns this value in the repository's hash. |
| master |
| hash | A hash of information about the most-recent (HEAD) commit for the current branch. Note: This hash's information resembles the output of the The function returns this hash in the repository's hash. | This hash includes the Important:
| |
| string | The timestamp for the most-recent commit. The function returns this value in the | A time, in Unix time format. | 1410277881 |
| string | The identifier (SHA-1 value) for the most-recent commit. The function returns this value in the | A valid SHA-1 value. | 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 |
| string | The most-recent commit's author's name and email address. The function returns this value in the | The author's name and email address as they exist in the user's Git configuration files. | Jane Doe <jane.doe@example.com> |
| string | The commit message. The function returns this value in the | A valid string. | I'm committing some particularly cromulent code. |
| hash | A hash of information about the commit that the system most recently deployed. Notes:
The function returns this hash in the repository's hash. | This hash includes the | |
| string | The timestamp for the most-recent deployment. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A time, in Unix time format. | 1410277881 |
| hash | A hash of information about the state of the repository at the time of the most recent deployment. Note: We added this hash in cPanel & WHM version 74. The function returns this hash in the | This hash includes the date , identifier , author , and message returns. | |
| string | The timestamp for the commit that the system most recently deployed. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A time, in Unix time format. | 1410277881 |
| string | The identifier (SHA-1 value) for the commit that the system most recently deployed. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A valid SHA-1 value. | 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 |
| string | The author's name and email address for the commit that the system most recently deployed. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | The author's name and email address as they exist in the user's Git configuration files. | Jane Doe <jane.doe@example.com> |
| string | The commit message for the commit that the system most recently deployed. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A valid string. | I'm committing some particularly cromulent code. |
| hash of arrays | A hash of arrays of URLs to use to clone the repository. The function returns this hash in the repository's hash. | This hash includes the read_write and read_only arrays. | |
| array | An array of clone URLs with read-write permissions. The function returns this array in the |
Important: If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number. | ssh://user@example.com/home/user/example |
| array | An array of clone URLs with read-only permissions. The function returns this array in the |
Important: If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number. | https://user@example.com/home/user/example |
| array of hashes | An array of hashes of information about the Task Queue system's process that will clone the repository. Note: The function only returns this value if the clone process is not finished. The function returns this hash in the repository's hash. | This array of hashes includes the id , subsystem , and action returns. | |
| string | The Task Queue system's task ID number. The function returns this value in the | A valid process ID. |
00000000/5a9ec8dd4c345d
|
| string | The Task Queue subsystem that will handle the task. The function returns this value in the | VersionControl is the only possible value. | VersionControl |
| string | The task's action. The function returns this value in the |
| |
| string | The Secure Server Events (SSE) interface to track the progress of the process. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A valid SSE URL. |
/sse/UserTasks/B3A27B96-51F7-11E8-92E3-CC90C4F823F0
|
| hash | A hash of arguments for the Task Queue system's process. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | This hash includes the repository_root and log_file returns. | |
| string | The repository's directory. Note: We added this return in cPanel & WHM version 74. The function returns this value in the | A valid absolute path to a directory within the user's home directory. | /home/user/example |
| string | The process's log file. Notes:
The function returns this value in the | A valid absolute path to a log file. | Click to view...
|
Function information
Module:
VersionControl
API Version:
Available in:
cPanel 72+
Methods:
GET, POST
Required Parameters:
(none)
Return formats:
JSON
Legacy Equivalents:
(none)
About this module
The VersionControl
module manages Git™ repositories.
About UAPI
UAPI accesses and modifies data for cPanel accounts.
Notes:
- These functions may require specific features. To enable or disable features, use WHM's Feature Manager interface.
- Unless you call this API via the WHM API, you must use the appropriate cPanel ports (
2082
or2083
). You can also call some functions via cPanel's Webmail ports (2095
or2096
).
Find a function
Related functions
-
Page:UAPI Modules - VersionControl — The
VersionControl
module manages Git™ repositories. -
Page:UAPI Modules - VersionControlDeployment — The
VersionControlDeployment
module manages Git™ deployments. -
Page:UAPI Functions - VersionControlDeployment::retrieve — This function retrieves the status of deployment tasks.
-
Page:UAPI Functions - VersionControlDeployment::create — This function deploys the changes from a cPanel-managed repository.
-
Page:UAPI Functions - VersionControlDeployment::delete — This function deletes a deployment task.