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

Description

This function returns a list of addon domains converted into cPanel accounts.

Important:

In cPanel & WHM version 76 and later, when you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples 


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


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


 Output (JSON)
{  
   "metadata":{  
      "reason":"OK",
      "version":1,
      "command":"convert_addon_list_conversions",
      "result":1
   },
   "data":{  
      "conversions":[  
         {  
            "job_id":1,
            "status":"DONE",
            "domain":"cptestaddon175.tld",
            "target_acct":"user2",
            "source_acct":"cptest",
            "start_time":1462216639,
            "end_time":1462216653
         },
         {  
            "source_acct":"cptest",
            "target_acct":"user2",
            "end_time":1462218449,
            "start_time":1462218428,
            "job_id":2,
            "status":"DONE",
            "domain":"cptestaddon175.tld"
         },
         {  
            "job_id":3,
            "status":"DONE",
            "domain":"cptestaddon175.tld",
            "target_acct":"user2",
            "source_acct":"cptest",
            "end_time":1462218934,
            "start_time":1462218920
         },
         {  
            "status":"DONE",
            "job_id":4,
            "domain":"cptestaddon175.tld",
            "source_acct":"cptest",
            "target_acct":"user2",
            "end_time":1462218997,
            "start_time":1462218975
         }
      ]
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <command>convert_addon_list_conversions</command>
        <reason>OK</reason>
    </metadata>
    <data>
        <conversions>
            <job_id>1</job_id>
            <status>DONE</status>
            <domain>"cptestaddon175.tld</domain>
            <target_acct/>user2</target_acct>
            <source_acct>cptest</source_acct>
            <start_time>1462216639</start_time>
            <end_time>1462216653</end_time>
 
            <job_id>2</job_id>
            <status>DONE</status>
            <domain>"cptestaddon175.tld</domain>
            <target_acct/>user2</target_acct>
            <source_acct>cptest</source_acct>
            <start_time>1462218428</start_time>
            <end_time>1462218449</end_time>
 
            <job_id>3</job_id>
            <status>DONE</status>
            <domain>"cptestaddon175.tld</domain>
            <target_acct/>user2</target_acct>
            <source_acct>cptest</source_acct>
            <start_time>1462218920</start_time>
            <end_time>1462218934</end_time>
 
            <job_id>4</job_id>
            <status>DONE</status>
            <domain>"cptestaddon175.tld</domain>
            <target_acct/>user2</target_acct>
            <source_acct>cptest</source_acct>
            <start_time>1462218975</start_time>
            <end_time>1462218997</end_time>
        </conversions>
    </data>
</result>


Note:

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

Parameters

This function does not accept parameters.

Returns

Return

TypeDescriptionPossible valuesExample

conversions

hash

A hash of the conversion data.

 

This hash includes the job_id, status, target_acct, source_acct, start_time, and end_time returns.

 

job_id

integer

The conversion's job number.

The function returns this value in the conversions hash.

A valid positive integer.

1

status

string

The status of the conversion process.

The function returns this value in the conversions hash.

  • DONE
  • IN PROGRESS
  • FAILED
DONE

target_acct

string

The destination user account for the conversion.

The function returns this value in the conversions hash.

A valid cPanel user account.user2

source_acct

string

The cPanel account username that owned the domain at the time of conversion.

The function returns this value in the conversions hash.

A valid addon domain.cptest

start_time

integer

The time when the process started.

The function returns this value in the conversions hash.

A date in  Unix time  format.
1462216639

end_time

integer

The time when the process ended.

The function returns this value in the conversions hash.

A date in  Unix time  format.
1462216653