Skip to content

Sandbox ​

A sandbox is a scratch canvas of your own. Put any blocks on it and run them against your development data, without touching a real route or workflow. Use one to try a custom block, prototype an idea, or look at data with DB Native, the KV blocks or the JS Runner.

WhatDetail
How manyAs many as you like, per project. They never expire.
Who sees oneOnly you. Nobody else in the project can see, open or run your sandboxes, not even an admin.
Who can make oneCreators and project admins. Viewers can't.
Where it runsOn a development worker, with your development values. Never on a production worker.
RecordingEvery run is recorded, and you can't switch it off.
TracingOff by default. Turn it on in the sandbox's settings to send its spans to the project's telemetry destination.

A sandbox canvas is like a route canvas and a workflow canvas at once. The same blocks run whether you call it over HTTP or run it as a workflow.

Call it over HTTP ​

Send a request to your development worker at:

/_sandbox/<sandbox id>/<anything you like>
  • Any method. GET, POST, PUT, PATCH, DELETE.
  • Any body. JSON, plain text, a form or a file. Nothing is checked before your blocks run.
  • Any path after the id. Your blocks see it as the request path. A request to /_sandbox/<id>/users/42 has the path /users/42.
  • It needs the development access token, in the x-fluxify-dev-token header. See Development access.
bash
curl -X POST \
  -H "x-fluxify-dev-token: fxd_..." \
  -H "content-type: application/json" \
  -d '{"name": "Ada"}' \
  http://localhost:5602/_sandbox/<sandbox id>/hello

Port 5602 is the development worker in the Kit and when you run Fluxify from source.

You sendYou get
The right tokenYour sandbox's answer.
No token, or a wrong one401
A sandbox id that does not exist, or was deleted404
Anything, to a production worker404, as for any unknown path.

The token never reaches your blocks

Fluxify removes the x-fluxify-dev-token header before your blocks run, so it does not show up in a recording either.

Run it as a workflow ​

Run starts the sandbox as a workflow, with the input you give it, on a development worker. It works the same way as a workflow's Run button. The run happens in the background; its recording shows what it did.

If no development worker is running, Run fails with "start a worker with FLUXIFY_ENV=development". See Starting one.

Custom blocks ​

Custom blocks work in a sandbox the same way they do on a route. A sandbox always runs the custom block as it is saved right now. Edit the custom block and the next sandbox run uses the new version, with no need to save the sandbox again.

Recordings ​

Every run leaves a recording: each request over HTTP and each Run. If a run fails, the failure also appears in the project's system logs.

Deleting a sandbox ​

Deleting a sandbox removes its canvas and its recordings. Its address answers 404 from then on.

Coming next

The sandbox screens in the portal (list, canvas and a playground to send requests) and triggers that start a sandbox are on the way. Until then you manage sandboxes through the admin API.

Released under the Apache License 2.0. Enterprise features are under the Fluxify Enterprise Edition License.