Create auto migration for domain

Setup automatic migration for a domain

  • HTTP Method: POST
  • URL: https://example.domain.tld/api/v1/automigration/setup/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin

Request parameters

Parameter Type Description Required
domain str Domain name to set up for auto migration Required
imap_serverhost str Source (old) IMAP server hostname Required
imap_serverport int Source (old) IMAP server port Required
imap_session str IMAP session (ssl or plain) to use Required
test_username str Username to test login on source IMAP server Required
test_password str Password to test login on source IMAP server Required

Response parameters

Parameter Type Description
domain str Domain name setup for auto migration
imap_serverhost str Source (old) IMAP server hostname
imap_serverport int Source (old) IMAP server port
imap_session str IMAP session (ssl or plain) to use

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/automigration/setup/"
data = {
"domain" : "vonmail.com",
"imap_serverhost" : "mail3.mymailcheap.com",
"imap_serverport" : 993,
"imap_session" : "ssl",
"test_username" : "test@vonmail.com",
"test_password" : "NCg55iljdQe6qR6a8bIh",
}
r = requests.post(url, json=data, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except: 
    print(r.text)

Example response (JSON)

{'domain': 'vonmail.com',
 'imap_serverhost': 'mail3.mymailcheap.com',
 'imap_serverport': 993,
 'imap_session': 'ssl'}