Skip to main content
GET
/
browsers
/
{id}
/
fs
/
watch
/
{watch_id}
/
events
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

const response = await client.browsers.fs.watch.events('watch_id', { id: 'id' });

console.log(response.path);
{
  "type": "CREATE",
  "name": "<string>",
  "path": "<string>",
  "is_dir": true
}

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

watch_id
string
required

Response

SSE stream of filesystem events

Filesystem change event.

type
enum<string>
required

Event type.

Available options:
CREATE,
WRITE,
DELETE,
RENAME
path
string
required

Absolute path of the file or directory.

name
string

Base name of the file or directory affected.

is_dir
boolean

Whether the affected path is a directory.

I