Skip to main content
POST
/
browsers
/
{id}
/
fs
/
watch
Watch a directory for changes
curl --request POST \
  --url https://api.onkernel.com/browsers/{id}/fs/watch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "path": "<string>",
  "recursive": false
}
'
{
  "watch_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Browser session ID

Body

application/json
path
string
required

Directory to watch.

recursive
boolean
default:false

Whether to watch recursively.

Response

Watch started successfully

watch_id
string

Unique identifier for the directory watch