runtime_sandboxes_files_link
Make an expiring link to one file in a sandbox that anyone can open with no API key, for a person to download in a browser or a service to fetch: a report, a build, a video, a dataset. method GET (default) downloads; PUT gives an upload link whose raw body becomes the file. archive: true links a folder as .tar.gz. expiresInSeconds 60 to 604800 (1 hour default). Answers url and expiresAt. POST /v1/sandboxes/{id}/files:revoke-links ends every link of a sandbox.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| path | Yes | Absolute path in the sandbox, e.g. /workspace/report.pdf. For GET it must exist when the link is made. | |
| wake | No | true: a paused sandbox is woken for the link even if it was made with autoWake: false; needs a key with the create permission, as a wake does. false: never woken, the link answers 409 sandbox_paused. Unset: as the sandbox's autoWake says. | |
| method | No | GET: a download link. PUT: an upload link; the body becomes the file. | GET |
| archive | No | GET only: path is a folder, downloaded as a .tar.gz. | |
| filename | No | Download as this name (Content-Disposition: attachment). Without it a picture, video, sound or plain text shows in the browser; anything else downloads. | |
| maxBytes | No | PUT only: the largest body the link takes. 5 GiB by default and at most. | |
| expiresInSeconds | No | How long the link works: 60 seconds to 7 days, 1 hour by default. |