hosting
POST /v1/sites/{siteId}/migrations/probe
Sign in to the old host and show what is there.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу hosting.import.manage; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/migrations/probe \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "source": <MigrationSource>, "host": <string>, "username": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
The migration form's preview: authenticates against the source and enumerates the estate without creating a job. Run while the customer is still on the screen, which is the whole design — a wrong password becomes a form error instead of a job that fails an hour later, and the customer confirms what is about to move before anything is committed. It is also where the mail precondition is discovered early enough to be fixable. Read unavailable before believing an empty list: it names what we could not look at, and "there is no mail here" and "this login cannot see mail" are opposite answers. Refusals arrive as 422 with a machine code per detail row (source_credentials_rejected, source_unreachable, source_port_unreachable, source_host_not_public, plesk_needs_admin_credentials, credential_required), so the dashboard localises them rather than showing engine English. source_port_unreachable is returned within ~8 s when nothing accepts a TCP connection on the source's port, and carries two more rows with the same code: field: port and field: addresses (our outbound IPv4 addresses, read live from the cluster, for the customer's host to allow). ⛔ POST although it creates nothing: the body carries a live credential for somebody else's server, and a GET would put it in a query string — browser history, proxy logs, access logs. Requires hosting.import.manage.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
source | MigrationSource | Да | The kind of hosting the site is being pulled from. ⛔ plesk is offered so the refusal can be specific and actionable, not because it is supported: pleskbackup is reachable… |
host | string | Да | The server's public hostname, e.g. server123.yourhost.com. Must resolve to a public address — a private or link-local target is refused with source_host_not_public at the door… |
username | string | Да | The login for the source panel or account. |
port | integer | Не | 0 means the source driver's default for that panel. |
password | string | Не | — |
private_key | string | Не | An SSH private key in PEM form, for an ssh source. |
api_token | string | Не | — |
include_mail | boolean | Не | ⚖️ Defaults to true, and a source that cannot deliver mailboxes is refused rather than silently migrated without them — a migration that moves a website and loses the mail is… |
mailbox_passwords | object | Не | address -> password, for every mailbox being moved. Required up front rather than discovered mid-sync: most panels will not hand over a mailbox without its own password, and… |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
domains | string[] | Да | — |
files | integer | Да | How many files were found. A count, not the list — a 5,000-file estate is not a form field, and the per-item rows are written by the job. |
databases | MigrationSourceDatabase[] | Да | — |
mailboxes | MigrationSourceMailbox[] | Да | — |
total_bytes | integer | Да | — |
truncated | boolean | Да | True when the source stopped short of a complete listing. Reported, never swallowed. |
unavailable | object | Да | ⭐ The most important field here: capability -> machine code, naming what we could not look at. An empty object means "we looked and there is nothing else", which is a… |
mailboxes_without_passwords | string[] | Да | The addresses no usable password was supplied for. The form points at exactly these rows; a create with any of them present is refused with mailbox_passwords_required. |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422 · 429