UAPI Functions - DCV::ensure_domains_can_pass_dcv

Description

This function indicates whether the account's domains can pass a Domain Control Validation (DCV) check.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/DCV/ensure_domains_can_pass_dcv?domain-1=example1.com&domain-2=example2.com&domain-3=example3.com

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Check the example1.com, example2.com, and example3.com domains to see if they resolve to the local server.
$poll $cpanel->uapi(
    'DCV''ensure_domains_can_pass_dcv',
    array(
        'domain-1' => 'example1.com',
        'domain-2' => 'example2.com',
        'domain-3' => 'example3.com'
  )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
#  Check the example1.com, example2.com, and example3.com domains to see if they can pass a DCV check.
my $poll $cpliveapi->uapi(
    'DCV''ensure_domains_can_pass_dcv',
    {
        'domain-1'  => 'example1.com',
        'domain-2'  => 'example2.com',
        'domain-3'  => 'example3.com'
  }
);

 cPanel Template Toolkit

<!-- Check the example1.com, example2.com, and example3.com domains to see if they can pass a DCV check. -->
[% execute('DCV', 'ensure_domains_can_pass_dcv', { 'domain-1' => 'example1.com','domain-2'=>'example2.com','domain-3'=>'example3.com' } ) %]

 Command Line

uapi --user=username DCV ensure_domains_can_pass_dcv domain-1=example1.com domain-2=example2.com domain-3=example3.com

 

Notes:

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

 Output (JSON)

   "data":[ 
      null,
      null,
      'The domain resolves to Mars. Beep beep beep.'
   ],
   "messages":null,
   "metadata":{ 
      "transformed":1
   },
   "status":1,
   "errors":null
}

 

Note:

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

 

Parameters

 Parameter 

 Type 

Description

 Possible values 

Example

domain

string

Required

The domains to check.

Note:

 To check multiple domains, duplicate or increment the parameter name. For example, to check three domains, use the domain parameter multiple times or use the domain-1, domain-2, and domain-3 parameters.

A valid string.

 example1.com 

 

 

Returns

 Return 

Type

Description

Possible values

Example

data

 array of strings 

The results from each domain parameter's DCV check.

Note:

 The function returns the results from the domains in the same order that you called them. 

  • null — The domain passes the DCV check.
  • A valid string that explains to where the domain resolves. 

 The domain resolves to Mars. Beep beep beep. 

 

  • 0 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....