.pdf)
WHM Plugins
listmxs function from within your custom script:
/xml-api/listmxs function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/listmxs
listmxs function from within your custom script:
/json-api/listmxs function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/listmxs
1.
listmxs function. example.com)
1 — success.
0 — failure.
1 in this case.
listmxs in this case.
https:example.com:2087/xml-api/listmxs?api.version=1&domain=example.com in WebHost Manager will produce results similar to:
<result>
<data>
<record>
<Line>21</Line>
<ttl>14400</ttl>
<class>IN</class>
<exchange>mx1.example.com</exchange>
<preference>0</preference>
<type>MX</type>
<name>example.com.</name>
</record>
<record>
<Line>28</Line>
<ttl>14400</ttl>
<class>IN</class>
<exchange>mx2.example.com</exchange>
<preference>20</preference>
<type>MX</type>
<name>example.com</name>
</record>
</data>
<metadata>
<result>1</result>
<reason>Records obtained.</reason>
<version>1</version>
<command>listmxs</command>
</metadata>
</result>
https:example.com:2087/json-api/listmxs?api.version=1&domain=example.com in WebHost Manager will produce results similar to:
{
"data":{
"record":[
{
"Line":"21",
"ttl":"14400",
"class":"IN",
"exchange":"mx1.example.com",
"preference":"0",
"type":"MX",
"name":"example.com."
},
{
"Line":"28",
"ttl":"14400",
"class":"IN",
"exchange":"mx2.example.com",
"preference":"20",
"type":"MX",
"name":"example.com.example.com."
}
]
},
"metadata":{
"result":1,
"reason":"Records obtained.",
"version":1,
"command":"listmxs"
}
}