Skip to content

datasources pull

Downloads datasources and their entries from a Storyblok space, recursively creates a folder structure if it doesn’t exist, and saves them to a local directory.

The command saves to the following folder structure and recursively creates it if it doesn’t exist yet.

.storyblok/
└── datasources/
└── <space-id>/
├── <datasource-name>.json
Terminal window
storyblok datasources pull [flags]
Flag Type Description
--space integer Required. The ID of the Storyblok space to pull datasources from.
--filename, -f string Optional. Specify a custom filename. Defaults to datasources.json. Ignored when --separate-files is used.
--separate-files, -sf boolean Optional. Save each datasource to a separate file.
--suffix, -su string Optional. Specify a custom suffix for datasource files.
--path, -p string Optional. Specify a custom path for datasource files. Defaults to .storyblok/datasources/<space-id>.

The following examples assume that a space has been defined in a configuration file.

Terminal window
# Pull all datasources from a space
storyblok datasources pull
# Pull all datasources from a space, saving each to a separate file with a custom suffix
storyblok datasources pull --separate-files --suffix dev
# Pull all datasources from a space, saving with a custom filename
storyblok datasources pull --filename my-datasources

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.