Do not forget to update Guide to Transfer and Restore API Functions

Description

This function retrieves a transfer module's key structure.


For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.


Examples 





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





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




whmapi1 transfer_module_schema module=AccountRemoteRoot




 {
  "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"
  }
}





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



   

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.

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