Migrations

Create an import from Git (any host, public or private with a deploy key), Vercel, Netlify, a WordPress backup, a database dump or a website snapshot

post/migrations

Request

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

Query parameters

orgIdstring

Organization id (required when you belong to several)

Request body

namestring

Name of the project (or database) to create; derived from the source when omitted

analyzeboolean

Start the analysis right away. Upload-based sources (wordpress, database with mode upload) are analyzed with POST /migrations/{id}/analyze once their artifacts are complete; a live database source is checked right away

Response

Created (analysis started unless it needs uploads first)

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.