Child pages
  • WHM API 1 Functions - transfer_module_schema

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Multiexcerpt
hiddentrue
MultiExcerptNameWarning

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

Description

Excerpt

This function retrieves a transfer module's key structure.


Note
titleNote:

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.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Multiexcerpt
MultiExcerptNameJSONAPI


Code Block
languagexml
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




Expand
titleXML API


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



Expand
titleCommand Line


Code Block
languagebash
whmapi1 transfer_module_schema module=AccountRemoteRoot

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Multiexcerpt
MultiExcerptNameOutputJSON


Code Block
languagetext
linenumberstrue
 {
  "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"
  }
}




Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

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

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