# Export as OCSF

Source: https://immiscible.fly.dev/docs/api/get-api-w-wid-export-ocsf

`GET /api/w/:wid/export/ocsf`

NDJSON, one OCSF 1.3 event per line. `since`, `until`, `limit`.

## Authentication

Session cookie. A signed-in person: the console's session cookie. Every state-changing request also carries the header `x-immiscible-csrf: 1`, and the member's role decides what it may do. Bearer tokens are ignored on these routes, so no machine credential can reach them.

## Path parameters

- `wid` (string, required): Workspace id

## Request

curl:

```bash
curl "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/export/ocsf?since=2026-10-01T00%3A00%3A00Z&limit=5000" \
  -H "cookie: __Host-sid=$IMMISCIBLE_SESSION"
```

Node:

```ts
const res = await fetch('https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/export/ocsf?since=2026-10-01T00%3A00%3A00Z&limit=5000', {
  headers: {
    cookie: `__Host-sid=${process.env.IMMISCIBLE_SESSION}`,
  },
});
console.log(res.status, await res.text());
```

Python:

```python
import os
import requests

res = requests.get(
    "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/export/ocsf",
    params={
        "since": "2026-10-01T00:00:00Z",
        "limit": "5000",
    },
    headers={
        "cookie": f"__Host-sid={os.environ['IMMISCIBLE_SESSION']}",
    },
)
print(res.status_code, res.text)
```
