Migrations

Start the import after the review: creates the project (or WordPress site / database) and runs the import steps

post/migrations/{migrationId}/start

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/migrations/{migrationId}/start
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

migrationIdstring uuid required
Example:3f2b8a4e-5c1d-4e8f-9a7b-2c6d1e0f4a5b

Request body

namestring

Override the name of the project/database to create

confirmDeployKeyboolean

Private Git: confirm the deploy key was added (read-only) to the repository

engine'postgresql' | 'mysql' | 'mariadb' | 'redis' | 'mongodb'

database: the engine when it could not be detected

envLaterstring[]

Variables of analysis.envToProvide to leave without a value for now: the import starts anyway and the project is created without them (Migration.envLater / envPending list them until they are set under the project's environment variables). A build that needs one fails until it is set; the import then comes back to review to enter it

tokenstring

vercel/netlify: a new access token when the one given at creation expired (credentials.provided false). Needed to download the deployment files unless repository is given. Encrypted, bound to this import, wiped when it ends

reviewSitesboolean

cpanel/sftp only: true stops every selected site's import in review (to choose its cron jobs or name first) instead of starting it as soon as its analysis is ready

accountsstring[]

cpanel with mode "whm" only: the cPanel accounts to import (analysis.accounts[].user). Each becomes its own live cPanel import that lists the sites of that account (linked back via source.importParentId); pick the sites there

cronTimezonestring

IANA time zone the old server ran its cron jobs in (e.g. Europe/Stockholm) when the analysis could not tell; the schedules are converted to UTC, the time zone Hostingsurge runs cron jobs in

copyBlobboolean

vercel: the same as services [{code: "blob", action: "move"}] (true) or "keep" (false), kept for older clients

protection'move' | 'keep'

vercel: set Vercel deployment protection up again here (analysis.protection; "move", the default) or leave the new project open ("keep")

siteDumpsstring[]

php: dumps of analysis.unclaimedDumps (by name) to load into new databases for this site although none of its files names them. Each is attached to the project (DATABASE_URL when it is its first); point the site's configuration at it

protectionPasswordstring

vercel: the password for the protection (Vercel never shows the old one). Omitted: a random one is set; choose your own under Settings → Protection. The username is "vercel". netlify: the same as services [{code: "netlify_protection", action: "move", input: {password}}] (the username is "netlify")

acceptUnsupportedFunctionsboolean

true imports the app although some of its functions cannot run on Hostingsurge (analysis.unsupportedFunctions: Python, Go or Ruby functions, api/ files beside a framework build that does not serve them, Netlify Functions). Without it such an import is refused (reason "functions_unsupported"), so it never reaches its preview with endpoints that answer 404

acceptMissingFilesboolean

true starts although files of the site could not be copied (analysis.files.notCopied: over 95 MB, unreadable on the old server, links, files cPanel's API cannot return …). Without it such an import is refused (reason "files_not_copied"), so nothing is ever left behind without a decision; an SFTP connection passes the choice on to the site it starts

Response

Import running (state importing)

idstring uuid required
organizationIdstring uuid required
kind'git' | 'vercel' | 'netlify' | 'heroku' | 'wordpress' | 'database' | 'static-snapshot' | 'cpanel' | 'sftp' | 'php' | 'email' required
state'draft' | 'analyzing' | 'review' | 'importing' | 'verifying' | 'preview_ready' | 'cutover' | 'live' | 'failed' | 'canceled' required
namestring required
sourceobject required

non-secret source summary

projectIdstring uuid nullable required
databaseIdstring uuid nullable required
previewUrlstring nullable required
pushDeploy'github_app' | 'off'

Git-linked imports (git, and vercel/netlify/heroku from a repository): github_app: every push to the branch deploys through the organization's GitHub App installation; off: pushes do not deploy by themselves until the App covers the repository or the project's push-to-deploy webhook is added to it (audit F10)

envLaterstring[]

variables left without a value when the import started (StartMigrationInput.envLater)

envPendingstring[]

GET /migrations/{id}: the envLater variables the project still does not have; set them under its environment variables, then redeploy

valuesExpiredboolean

review: the variable values read from the old host were kept for 24 hours and are gone; analyze again (with a new token) before starting

cancelRequestedboolean required
createdAtstring required

ISO-8601 timestamp

updatedAtstring required

ISO-8601 timestamp

finishedAtstring nullable required

ISO-8601 timestamp

expiresAtstring required

ISO-8601 timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.