Child pages
  • WHM API 1 Functions - savemxs

Versions Compared

Key

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

Description

Excerpt

This function creates a new MX record.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledDNSRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/savemxs?api.version=1&domain=example.com&name=mail&exchange=ns1.example.com&preference=10&ttl=14400



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/savemxs?api.version=1&domain=example.com&name=mail&exchange=ns1.example.com&preference=10&ttl=14400



Expand
titleCommand Line


Code Block
languagebash
whmapi1 savemxs domain=example.com name=mail exchange=ns1.example.com preference=10 ttl=14400

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "metadata": {
    "result": 1,
    "reason": "Bind reloading on server1 using rndc zone: [example.com]\n",
    "version": 1,
    "command": "savemxs"
  }
}



Expand
titleOutput (XML)


Code Block
languagexml
linenumberstrue
<result>
    <metadata>
        <result>1</result>
        <reason>Bind reloading on server1 using rndc zone: [example.com]</reason>
        <version>1</version>
        <command>savemxs</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The zone record's domain.

A valid domain name on the server.example.com

name

string

Required

The record name.

A valid domain name or hostname.

mail.example.com

exchange

string

Required

The domain's mail exchanger.

A valid mail exchanger.mail.example.com

preference

integer

Required

The MX record's priority order.

An integer that represents the record's priority order.

Note
titleNote:

Lower numbers indicate a higher priority order. 


20

class

string

The record's class.

This value defaults to IN.

  • IN
  • Very rarely, another valid DNS record class.

IN
ttlintegerThe record's Time To Live (TTL).

A positive integer that represents the TTL, in seconds.

86400
serialnumintegerThe record's serial number.A valid serial number. 2013122501

Returns

This function only returns metadata.