Skip to content

CLI: Imports

Commands to create a space from an exported file. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.

Command Description
hakocms-cli imports create Send a ZIP to import (one you got with hakocms-cli exports download)
hakocms-cli imports delete Delete an import record and the received ZIP
hakocms-cli imports get Get one import
hakocms-cli imports leftovers delete Delete a space whose import stopped
hakocms-cli imports leftovers list List spaces left in the importing state after an import stopped partway
hakocms-cli imports list List imports
hakocms-cli imports start Start importing a ZIP you sent

Send a ZIP to import (one you got with hakocms-cli exports download).

Sends a ZIP to import (one you got with hakocms-cli exports download).

The import does not start yet. Look at the summary that comes back, then start it with imports start –slug … –name …. Large files are sent in chunks too (if the connection drops partway, that chunk is resent)

ターミナルウィンドウ
hakocms-cli imports create <FILE>
Flag or argument Description
<FILE> ZIP file

Delete an import record and the received ZIP.

Deletes an import record and its ZIP.

Ones that are waiting or running cannot be deleted (409)

ターミナルウィンドウ
hakocms-cli imports delete [OPTIONS] <ID>
Flag or argument Description
<ID> ID
--force Do it without asking for confirmation

Get one import.

ターミナルウィンドウ
hakocms-cli imports get <ID>
Flag or argument Description
<ID> ID

Delete a space whose import stopped.

Deletes what was partially imported, together with its files in storage.

ターミナルウィンドウ
hakocms-cli imports leftovers delete [OPTIONS] <SLUG>
Flag or argument Description
<SLUG> The space’s slug
--force Do it without asking for confirmation

List spaces left in the importing state after an import stopped partway.

Lists spaces whose import stopped.

Spaces whose import stopped partway and that remain in the importing state.

ターミナルウィンドウ
hakocms-cli imports leftovers list

List imports.

Returns up to 20 items, newest first.

ターミナルウィンドウ
hakocms-cli imports list

Start importing a ZIP you sent.

Starts importing a ZIP you sent.

Returns 409 if the slug is already in use or the import has already started.

ターミナルウィンドウ
hakocms-cli imports start [OPTIONS] <ID>
Flag or argument Description
<ID> ID
--name <TEXT> Name of the space the import creates
--slug <TEXT> Slug of the space the import creates
--data <JSON> The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it
--wait Wait until the job finishes and print the result. Exits with 1 if it fails