UAPI Functions - Integration::fetch_url

Description

This function returns the URL for an integrated application.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Integration/fetch_url?app=applicationname

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// What is the URL of the application applicationname?
$application_url $cpanel->uapi(
    'Integration''fetch_url',    array(
        'app'    => 'applicationname',
    )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# What is the URL of the application applicationname?
my $application_url $cpliveapi->uapi(
    'Integration''fetch_url',    {
        'app'    => 'applicationname',
    }
);

 cPanel Template Toolkit

<!-- What is the URL of the application applicationname? -->
[% data = execute( 'Integration', 'fetch_url', { app => 'applicationname'}  ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

 Command Line

uapi --user=username Integration fetch_url app=applicationname

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

   "messages":null,
   "data":{ 
      "redirect_url":"http://applicationname.example.com/application"
   },
   "status":1,
   "errors":null,
   "metadata":{ 
 
   }
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

 Parameter 

Type

Description

 Possible values 

Example

app

 string 

Required

 The application's name. 

A valid string.

 applicationname 

 

Returns

The function outputs one or both of the following returns:

Return

 Type 

Description

Possible values

Example

 redirect_url 

string

The URL to which the application will redirect visitors.

A valid publicly-available URL.

 http://application.example.com/application 

 

url

 string

 The URL to which the application redirects visitors if the redirect_urllocation is unavailable. 

 A valid publicly-available URL. 

http://application.example.com/

 

  • 13 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....