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

 

Description

This function retrieves a transfer module's key structure.

Examples 


 JSON API

https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=FeatureListsRemoteRoot
 
https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=PackageRemoteRoot
 
https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=AccountRemoteRoot

 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/transfer_module_schema?api.version=1&module=AccountRemoteRoot
 Command Line
whmapi1 transfer_module_schema module=AccountRemoteRoot


Notes:

  • 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)

 {
  "data": {
    "schema": {
      "keys": {
        "detected_remote_user": {
          "def": "char(255) DEFAULT NULL"
        },
        "ip": {
          "def": "int(1) DEFAULT 0"
        },
        "skipbwdata": {
          "def": "int(1) DEFAULT 0"
        },
        "customip": {
          "def": "char(255) DEFAULT NULL"
        },
        "size": {
          "def": "BIGINT UNSIGNED DEFAULT 1"
        },
        "shared_mysql_server": {
          "def": "int(1) DEFAULT 0"
        },
        "domain": {
          "def": "char(255) DEFAULT NULL"
        },
        "cpmovefile": {
          "def": "text"
        },
        "skiphomedir": {
          "def": "int(1) DEFAULT 0"
        },
        "user": {
          "def": "char(255) DEFAULT NULL"
        },
        "skipacctdb": {
          "def": "int(1) DEFAULT 0"
        },
        "skipres": {
          "def": "int(1) DEFAULT 0"
        },
        "reseller": {
          "def": "int(1) DEFAULT 0"
        },
        "skipaccount": {
          "def": "int(1) DEFAULT 0"
        },
        "copypoint": {
          "def": "text"
        },
        "force": {
          "def": "int(1) DEFAULT 0"
        },
        "xferpoint": {
          "def": "int(1) DEFAULT 0"
        },
        "replaceip": {
          "def": "char(255) DEFAULT NULL"
        },
        "localuser": {
          "def": "char(255) DEFAULT NULL"
        }
      },
      "required": [
        "user",
        "localuser"
      ],
      "primary": [
        "user"
      ]
    }
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "transfer_module_schema"
  }
}

 Output (XML)
<result>
    <data>
        <schema>
            <keys>
                <detected_remote_user>
                    <def>char(255) DEFAULT NULL</def>
                </detected_remote_user>
                <ip>
                    <def>int(1) DEFAULT 0</def>
                </ip>
                <skipbwdata>
                    <def>int(1) DEFAULT 0</def>
                </skipbwdata>
                <customip>
                    <def>char(255) DEFAULT NULL</def>
                </customip>
                <size>
                    <def>BIGINT UNSIGNED DEFAULT 1</def>
                </size>
                <shared_mysql_server>
                    <def>int(1) DEFAULT 0</def>
                </shared_mysql_server>
                <domain>
                    <def>char(255) DEFAULT NULL</def>
                </domain>
                <cpmovefile>
                    <def>text</def>
                </cpmovefile>
                <skiphomedir>
                    <def>int(1) DEFAULT 0</def>
                </skiphomedir>
                <user>
                    <def>char(255) DEFAULT NULL</def>
                </user>
                <skipacctdb>
                    <def>int(1) DEFAULT 0</def>
                </skipacctdb>
                <skipres>
                    <def>int(1) DEFAULT 0</def>
                </skipres>
                <reseller>
                    <def>int(1) DEFAULT 0</def>
                </reseller>
                <skipaccount>
                    <def>int(1) DEFAULT 0</def>
                </skipaccount>
                <copypoint>
                    <def>text</def>
                </copypoint>
                <force>
                    <def>int(1) DEFAULT 0</def>
                </force>
                <xferpoint>
                    <def>int(1) DEFAULT 0</def>
                </xferpoint>
                <replaceip>
                    <def>char(255) DEFAULT NULL</def>
                </replaceip>
                <localuser>
                    <def>char(255) DEFAULT NULL</def>
                </localuser>
            </keys>
            <required>user</required>
            <required>localuser</required>
            <primary>user</primary>
        </schema>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>transfer_module_schema</command>
    </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
module
string

Required

The transfer module's name.

  • AccountLocal
  • AccountRemoteRoot
  • AccountRemoteUser
  • FeatureListRemoteRoot
  • LegacyAccountBackup
  • PackageRemoteRoot
AccountRemoteRoot

Returns

ReturnTypeDescriptionPossible valuesExample
schema
hash

A hash of the schema's keys.

A hash that includes the keys hash and the required and primary arrays. 

keys

hash

A hash of the schema's keys.

The function returns this hash in the schema hash.

A hash that includes the key name hash. 

key name

hash

A hash of the key's information.

Note:

The key's name is the parameter name.

The function returns this hash in the keys hash.

 

A hash that includes the def return. 

def

string

The key's definition.

This function returns this value in the key name hash.

The first value is the parameter's type and length.

  • int
  • char
  • bigint
  • text

The second value is the default value.

char(255) DEFAULT NULL

required

array

The schema's required keys.

This function returns this value in the schema hash.

Any value or values from the key name field.user, localuser

primary

array

The schema's primary key.

This function returns this value in the schema hash.

Any value from the key name field.user