blokscript-env.json File Reference

Example:

{
    "managementApiBaseUrl": "https://api-us.storyblok.com",
    "contentDeliveryApiBaseUrl": "https://api-us.storyblok.com/v2/cdn",
    "personalAccessToken": "sQbtte4FBrXQeiEGAddIMwtt-111111-VtWM6H2tXg9ohZocdLx",
    "verbosity": "verbose",
    "managementApiTimeoutMs": 10000,
    "managementApiThrottleMs": 2000,
    "managementApiRetryCount": 2
}

managementApiBaseUrl

The Storyblok Management API Base URL.

Storyblok has different Management API base URLs for the United States, Europe and China. Make sure you use the correct base URL for your region. The base URLs are listed in the Storyblok Management API Introduction under the API Libraries section.

contentDeliveryApiBaseUrl

The Storyblok Content Delivery API Base URL.

Storyblok has different Content Delivery API base URLs for the United States, Europe and China. Make sure you use the correct base URL for your region. The base URLs are listed in the Storyblok Content Delivery API Introduction under the Region-specific base URLs section.

personalAccessToken

Your personal access token generated by Storyblok in the Personal Access Token area in your Storyblok account. This is a secret. Do not share it with anyone else.

verbosity

Tells how loud or quiet BlokScript should be. Valid values are verbose, quiet, and debugger.

verbose

BlokScript will tell you what it's doing and report all errors to the terminal. Good for interactive use.

quiet

BlokScript will not tell you what it's doing, but it will report errors. Good for scripting or when you only want to know when an error has occurred.

debugger

BlokScript will tell you everything it's doing and more. You'll get variable names, request and response payloads and other information useful to BlokScript developers. Error messages and stack traces are shown also.

managementApiTimeoutMs

The maximum amount of time that BlokScript lets a request to the Storyblok Managment API last, in milliseconds. Sometimes a request hangs or the response is too big, so this configuration setting helps the request fail faster.

If you combine this with a retry count, you can make your script more resilient.

managementApiThrottleMs

The minimum amount of time that must occur between API calls, in milliseconds. BlokScript will wait until this minimum is reached. This is useful if you don't want to hit Storyblok too many times in a time period.

managementApiRetryCount

The number of times BlokScript will retry a timed-out request. Sometimes a request will hang, but you don't want the script to fail.