We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - get_users_links
Skip to end of metadata
Go to start of metadata

This function provides a list of appkeys and the URLs that correspond to applications for the cPanel user's theme.  Use these appkeys for the app parameter's value within the WHM API 1 create_user_session function.


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_users_links?api.version=1&user=username
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_users_links?api.version=1&user=username
 Command Line
whmapi1 get_users_links user=username


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
Valid:
{
	"data": {
		"Backups_Home": "frontend/paper_lantern/backup/index.html",
		"Calendar_Configure": "frontend/paper_lantern/mail/calendars_and_contacts/index.html",
		"ContactInfo_Change": "frontend/paper_lantern/contact/index.html",
		"Cron_Home": "frontend/paper_lantern/cron/index.html",
		"Database_MySQL": "frontend/paper_lantern/sql/index.html",
		"Database_phpMyAdmin": "frontend/paper_lantern/sql/PhpMyAdmin.html",
		"Domains_AddonDomains": "frontend/paper_lantern/addon/index.html",
		"Domains_SubDomains": "frontend/paper_lantern/subdomain/index.html",
		"Email_AccountLevelFiltering": "frontend/paper_lantern/mail/filters/userfilters.html",
		"Email_Accounts": "frontend/paper_lantern/mail/pops/index.html",
		"Email_Archive": "frontend/paper_lantern/mail/archive.html",
		"Email_Authentication": "frontend/paper_lantern/mail/auth.html",
		"Email_AutoResponders": "frontend/paper_lantern/mail/autores.html",
		"Email_BoxTrapper": "frontend/paper_lantern/mail/boxtrapper.html",
		"Email_DefaultAddress": "frontend/paper_lantern/mail/def.html",
		"Email_DeliveryReport": "frontend/paper_lantern/mail/route.html",
		"Email_Disk_Usage": "frontend/paper_lantern/mail/manage_disk_usage/",
		"Email_Forwarders": "frontend/paper_lantern/mail/fwds.html",
		"Email_GreyListing": "frontend/paper_lantern/mail/greylisting/index.html",
		"Email_MailingLists": "frontend/paper_lantern/mail/lists.html",
		"Email_Routing": "frontend/paper_lantern/mail/email_routing.html",
		"Email_SpamFilter": "frontend/paper_lantern/mail/spam/spam.html",
		"Email_UserLevelFiltering": "frontend/paper_lantern/mail/filters/managefilters.html",
		"FileManager_Home": "frontend/paper_lantern/filemanager/index.html",
		"Locale_Change": "frontend/paper_lantern/setlang/index.html",
		"Password_Change": "frontend/paper_lantern/passwd/index.html",
		"SSL_TLS_Manager": "frontend/paper_lantern/ssl/index.html",
		"SSL_TLS_Status": "frontend/paper_lantern/security/tls_status/",
		"SSL_TLS_Wizard": "frontend/paper_lantern/security/tls_wizard/",
		"Site_Software": "frontend/paper_lantern/addoncgi/cpaddons.html",
		"Solr_Disk_Usage": "frontend/paper_lantern/mail/search_index/",
		"Stats_AWStats": "frontend/paper_lantern/stats/awstats_landing.html"
	},
	"metadata": {
		"version": 1,
		"reason": "OK",
		"result": 1,
		"command": "get_users_links"
	}
}
 Output (XML)
<result>
    <data>
	  <Backups_Home>frontend/paper_lantern/backup/index.html</Backups_Home>
	  <Calendar_Configure>frontend/paper_lantern/mail/calendars_and_contacts/index.html</Calendar_Configure>
	  <ContactInfo_Change>frontend/paper_lantern/contact/index.html</ContactInfo_Change>
	  <Cron_Home>frontend/paper_lantern/cron/index.html</Cron_Home>
	  <Database_MySQL>frontend/paper_lantern/sql/index.html</Database_MySQL>
	  <Database_phpMyAdmin>frontend/paper_lantern/sql/PhpMyAdmin.html</Database_phpMyAdmin>
	  <Domains_AddonDomains>frontend/paper_lantern/addon/index.html</Domains_AddonDomains>
	  <Domains_SubDomains>frontend/paper_lantern/subdomain/index.html</Domains_SubDomains>
	  <Email_AccountLevelFiltering>frontend/paper_lantern/mail/filters/userfilters.html</Email_AccountLevelFiltering>
	  <Email_Accounts>frontend/paper_lantern/mail/pops/index.html</Email_Archive>
	  <Email_Archive>frontend/paper_lantern/mail/archive.html</Email_Authentication>
	  <Email_Authentication>frontend/paper_lantern/mail/auth.html</Email_Authentication>
	  <Email_AutoResponders>frontend/paper_lantern/mail/autores.html</Email_AutoResponders>
	  <Email_BoxTrapper>frontend/paper_lantern/mail/boxtrapper.html</Email_BoxTrapper>
	  <Email_DefaultAddress>frontend/paper_lantern/mail/def.html</Email_DefaultAddress>
	  <Email_DeliveryReport>frontend/paper_lantern/mail/route.html</Email_DeliveryReport>
	  <Email_Disk_Usage>frontend/paper_lantern/mail/manage_disk_usage/</Email_Disk_Usage>>
	  <Email_Forwarders>frontend/paper_lantern/mail/fwds.html</Email_Forwarders>
	  <Email_GreyListing>frontend/paper_lantern/mail/greylisting/index.html</Email_GreyListing>
	  <Email_MailingLists>frontend/paper_lantern/mail/lists.html</Email_MailingLists>
	  <Email_Routing>frontend/paper_lantern/mail/email_routing.html</Email_Routing>
	  <Email_SpamFilter>frontend/paper_lantern/mail/spam/spam.html</Email_SpamFilter>
	  <Email_UserLevelFiltering>frontend/paper_lantern/mail/filters/managefilters.html</Email_UserLevelFiltering>
	  <FileManager_Home>frontend/paper_lantern/filemanager/index.html</FileManager_Home>
	  <Locale_Change>frontend/paper_lantern/setlang/index.html</Locale_Change>
	  <Password_Change>frontend/paper_lantern/passwd/index.html</Password_Change>
	  <SSL_TLS_Manager>frontend/paper_lantern/ssl/index.html</SSL_TLS_Manager>
	  <SSL_TLS_Status>frontend/paper_lantern/security/tls_status/</SSL_TLS_Status>
	  <SSL_TLS_Wizard>frontend/paper_lantern/security/tls_wizard/</SSL_TLS_Wizard>
	  <Site_Software>frontend/paper_lantern/addoncgi/cpaddons.html</Site_Software>
	  <Solr_Disk_Usage>frontend/paper_lantern/mail/search_index/</Solr_Disk_Usage>
	  <Stats_AWStats>frontend/paper_lantern/stats/awstats_landing.html</Stats_AWStats>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_users_links</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The requested user's username.

A valid username. user
servicestring

The interface for which to filter results.

This parameter defaults to cpaneld.

  • cpaneld
  • webmail
cpaneld
ReturnTypeDescriptionPossible valuesExample
appstring

The URL that corresponds to the application.

Note:

The application's name is the return's name.

A valid file location, relative to the user's session location.

"Backups_Home":"frontend/paper_lantern/backup/index.html"