Importing Data
Confused about "Importing Data"?
Let us know how we can improve our documentation:
If you've just started using Stream, you might want to import data from your old infrastructure. Instead of using the APIs and creating your own import scripts, you can make use of our import feature. If you are on a paid plan you can import data into your app via the dashboard.
The Process
Copied!Confused about "The Process"?
Let us know how we can improve our documentation:
The steps for importing data into your app are as follows:
Generate the import file for your data (full file reference below)
Upload the import file via the dashboard. The import file is limited to a maximum size of 300MB. For larger imports please contact us
The file will be validated according to the rules described in this doc
If validation passes, a member of our team will approve and run the import
Once the import is completed (usually a few minutes), you will get a confirmation email
Import File
Copied!Confused about "Import File"?
Let us know how we can improve our documentation:
The import file must be in the JSON Lines text format (newline-delimited json). That means that each line must be a valid json. More info here.
Instruction Reference
Copied!Confused about "Instruction Reference"?
Let us know how we can improve our documentation:
Each line consists of an import instruction and must have the following elements:
Name | Type | Description |
---|---|---|
instruction | string | Instruction name. Must be a valid instruction type. |
feedId | string | The feed to import data to, required by add_activities and follow |
data | array | The data for that particular instruction, see below. |
Instruction Types
Copied!Confused about "Instruction Types"?
Let us know how we can improve our documentation:
An import file can contain different types of instructions. This is the list of supported instruction types:
add_activities
follow
reactions
users
collections
follow
Copied!Confused about "follow"?
Let us know how we can improve our documentation:
An array of feed ids. As you can only follow flat feeds, make sure that all the feeds are flat feeds.
add_activities
Copied!Confused about "add_activities"?
Let us know how we can improve our documentation:
An array of activities at max 3600 in a line. The rules described in the adding activities doc apply for each activity. In addition, each activity must have the foreign_id and time fields present. The time field must have the RFC3339 format.
collections
Copied!Confused about "collections"?
Let us know how we can improve our documentation:
An array of collection entries in which each line can have up to 10,000 entries. Entries must have the following fields not empty: collection, id and data.
users
Copied!Confused about "users"?
Let us know how we can improve our documentation:
An array of users in which each line can have up to 10,000 entries. Entries must have the id field.
reactions
Copied!Confused about "reactions"?
Let us know how we can improve our documentation:
An array of reactions in which each line can have up to 10,000 entries. Entries must include: id, kind, user_id, activity_id, time. If the related activity is part of the same import, activity_foreign_id and activity_time replace activity_id. Check the REST docs for the complete list of allowed fields.