Quickstart
Create a sandbox, run a command, and delete it when finished.
Have ready
Section titled “Have ready”curlandjq.- Your provider’s API URL and a team token. See authentication.
-
Set your API URL. Supply
WISPS_TOKENthrough your secret manager or local environment; do not commit it.Terminal window export WISPS_URL=https://api.example.com -
Create a sandbox. Save its generated name. Without a mode, the API creates an ephemeral wisp.
Terminal window WISP_NAME=$(curl --fail-with-body -sS \-H "Authorization: Bearer $WISPS_TOKEN" \-H 'Content-Type: application/json' \"$WISPS_URL/v1/wisps" \-d '{}' | jq -er '.name') -
Run a command. The request waits for the command to finish.
Terminal window curl --fail-with-body -sS \-H "Authorization: Bearer $WISPS_TOKEN" \-H 'Content-Type: application/json' \"$WISPS_URL/v1/wisps/$WISP_NAME/run" \-d '{"script":"printf hello"}' -
Delete the sandbox when you no longer need its files.
Terminal window curl --fail-with-body -sS -X DELETE \-H "Authorization: Bearer $WISPS_TOKEN" \"$WISPS_URL/v1/wisps/$WISP_NAME"
The run response contains "exit_code":0 and "stdout":"hello". Deletion returns HTTP 204 with no body.
Use the SDKs for typed calls, or learn about commands, files, and lifecycle.