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>.jsonstoryblok 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>. |
Examples
Section titled “Examples”The following examples assume that a space has been defined in a configuration file.
# Pull all datasources from a spacestoryblok datasources pull# Pull all datasources from a space, saving each to a separate file with a custom suffixstoryblok datasources pull --separate-files --suffix dev# Pull all datasources from a space, saving with a custom filenamestoryblok datasources pull --filename my-datasourcesWas this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community