---
title: "One import with its steps and newest log lines (read-only; never a credential)"
method: GET
path: "/operator/imports/{migrationId}"
tags: ["Operator"]
---

# One import with its steps and newest log lines (read-only; never a credential)

`GET /operator/imports/{migrationId}`

## Request

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

## Path parameters

- `migrationId` string, uuid, required

## Response `200`

Import

- object
  - `id` string, uuid, required
  - `organizationId` string, uuid, required
  - `organizationName` string, required
  - `kind` string, required
  - `state` string, required
  - `name` string, required
  - `source` object, required: allow-listed, non-secret summary: host, siteUrl, url, repoUrl, branch, project, app, site, mode, importParentId
  - `parentId` string, uuid, nullable, required: the cPanel/SFTP connection a site's import was started from
  - `projectId` string, uuid, nullable, required
  - `projectName` string, nullable, required: null: no project, or it was deleted
  - `currentStep` string, nullable, required: the step running now (none while the import waits)
  - `errorCode` string, nullable, required
  - `errorMessage` string, nullable, required
  - `cancelRequestedAt` string, nullable, required: ISO-8601 timestamp
  - `leaseExpiresAt` string, nullable, required: ISO-8601 timestamp
  - `stuck` boolean, required: running on our side, no worker holds it and nothing happened for 15 minutes
  - `cancelWaits` 'step' | 'cleanup' | 'null', nullable, required: how a cancel now would end: step (a worker holds the import: it stops at its next check), cleanup (the worker first closes a Remote MySQL entry on the old server or stops the mail copies it watches), null (it ends at once)
  - `createdAt` string, required: ISO-8601 timestamp
  - `updatedAt` string, required: ISO-8601 timestamp
  - `lastActivityAt` string, required: the newest step change or log line (or the creation)
  - `finishedAt` string, nullable, required: ISO-8601 timestamp
  - `previewUrl` string, nullable, required
  - `steps` object[], required
    - `name` string, required
    - `phase` string, required
    - `state` string, required
    - `attempts` integer, required
    - `detail` string, nullable, required
    - `errorMessage` string, nullable, required
    - `startedAt` string, nullable, required: ISO-8601 timestamp
    - `finishedAt` string, nullable, required: ISO-8601 timestamp
  - `logs` object[], required: the newest 500 lines, oldest first
    - `seq` integer, required
    - `step` string, nullable, required
    - `level` 'info' | 'warn' | 'error', required
    - `message` string, required
    - `createdAt` string, required: ISO-8601 timestamp
  - `logsTotal` integer, required

## Other responses

- `400`: Invalid request (code invalid_request)
- `403`: An action on an operator-console session older than 5 minutes (code forbidden, details.reauthenticate: sign in again at /admin/login), or an operator removed since the session was resolved
- `404`: Not found (code not_found); also the answer to any request without a live operator-console session (no admin cookie, a dashboard session, an API/MCP key or OAuth token, or a caller who is not a platform operator)
- `429`: Too many requests (code rate_limited); see Retry-After
- `501`: Not available on this server (code not_configured)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
