curl --request GET \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/files/watch' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY"
"string"
Watch for file changes via SSE
Server-sent event stream. Opens with one snapshot event whose data is {files: string[], path} (an ls -R listing of the watched directory), then a change event…
GET
/
api
/
v1
/
sandbox
/
{id}
/
files
/
watch
curl --request GET \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/files/watch' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY"
"string"
Path parameters
string (uuid)
required
Sandbox identifier
Query parameters
string
Directory to watch (default /workspace)
Response
Returnstext/event-stream — Server-sent event stream. Opens with one snapshot event whose data is {files: string[], path} (an ls -R listing of the watched directory), then a change event with {added: string[], removed: string[]} whenever the listing differs on the 5-second poll, with : heartbeat comments every 15s.
Status codes
| Code | Meaning |
|---|---|
200 | Server-sent event stream. Opens with one snapshot event whose data is {files: string[], path} (an ls -R listing of the watched directory), then a change event with {added: string[], removed: string[]} whenever the listing differs on the 5-second poll, with : heartbeat comments every 15s. |
404 | Sandbox not found |
curl --request GET \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/files/watch' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY"
"string"
Last modified on August 31, 2026