getstream import
Scope: app
Import bulk data into your Stream app from a prepared file.
Start an import with the chat or feeds subcommand. The import is
processed in the background. Follow it with --watch, or check on it
later with the status and list subcommands.
Like every app-scoped command, import acts on the current project's
app unless --app-id or the STREAM_API_KEY and STREAM_API_SECRET
environment variables override it.
getstream import [flags]
getstream import [command]Examples
getstream import chat export.jsonl --watch
getstream import listSubcommands
getstream import chat
Import bulk Chat data from a prepared file. The import is processed in
the background. Follow it with --watch, or check on it later with the
status and list subcommands.
Imports run in upsert mode: re-importing a file updates existing objects instead of duplicating them. See the file format reference.
getstream import chat <file> [flags]Examples
getstream import chat data.json
getstream import chat data.json --watchFlags
| Flag | Description |
|---|---|
--merge-custom |
merge custom data fields |
-w, --watch |
follow the import task until it finishes |
getstream import feeds
Import bulk Activity Feeds data from a prepared file. The import is
processed in the background. Follow it with --watch, or check on it
later with the status and list subcommands.
Validation fails when the file references a user or activity that exists
neither in the file nor in the app. Add --skip-references-check for
partial files. See the file format reference.
getstream import feeds <file> [flags]Examples
getstream import feeds data.json
getstream import feeds data.json --skip-references-check
getstream import feeds data.json --watchFlags
| Flag | Description |
|---|---|
--skip-references-check |
skip references validation |
-w, --watch |
follow the import task until it finishes |
getstream import list
List the app's import tasks, chat and feeds alike.
getstream import list [flags]Examples
getstream import list
getstream import list --state 4Flags
| Flag | Description |
|---|---|
-s, --state <int> |
filter tasks by state: 1 queued, 2 processing, 3 failed, 4 completed |
getstream import status
Show an import task by ID, for chat and feeds imports alike.
Pass --watch to keep polling until the import completes or fails.
getstream import status <id> [flags]Examples
getstream import status dcb6e366-93ec-4e52-af6f-b0c030ad5272
getstream import status dcb6e366-93ec-4e52-af6f-b0c030ad5272 --watchFlags
| Flag | Description |
|---|---|
-w, --watch |
follow the import task until it finishes |
Flags
| Flag | Description |
|---|---|
--app-id <int> |
id of the app to act on; defaults to the project's app |
Global flags
| Flag | Description |
|---|---|
--verbose |
print API requests and full error details |