PRE-RELEASE: Sandbox commands are not GA yet. Their arguments, flags, and output may change.
?preview_token=<token>; the first request sets a cookie so a browser can keep navigating without it.
create
--expires-at.
Options
TEXT
required
Time the token stops working. ISO 8601, local when no timezone is given.
BOOL
Return an existing unexpired token of the preview that stays valid at least until —expires-at, instead of creating one. A token created moments before may not be found yet, so a new one may be created anyway.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
required
Name of the preview.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
Create a token valid until a given timeFilter output with --jq
Create a token and print it
Output
Text mode (--output text): One field per line describing the token, then the preview URL with the token appended.
JSON mode (--output json): payload type managementapi.SandboxPreviewToken.
list
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
required
Name of the preview.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging
Examples
List a preview’s tokensFilter output with --jq
Print every unexpired token’s name
Output
Text mode (--output text): Table with columns: NAME, EXPIRES, EXPIRED. Prints “No tokens found.” to stderr when the list is empty.
JSON mode (--output json): payload type cmd.SandboxPreviewTokenList.
delete
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
required
Name of the sandbox.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
required
Name of the preview.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the sandbox belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
TEXT
required
Name of the token.
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging
Examples
Delete a token without the confirmation promptOutput
Text mode (--output text): A confirmation line on stderr.