# Retrieve a trace

Source: https://immiscible.fly.dev/docs/api/get-api-w-wid-traces-traceid

`GET /api/w/:wid/traces/:traceId`

Every ledger record in one W3C trace, in order, with its subject. See [traces](https://immiscible.fly.dev/docs/guides/traces-and-reviews.md#traces).

## 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
- `traceId` (string, required): W3C trace id, 32 hex characters

## Request

curl:

```bash
curl "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/traces/4bf92f3577b34da6a3ce929d0e0e4736" \
  -H "cookie: __Host-sid=$IMMISCIBLE_SESSION"
```

Node:

```ts
const res = await fetch('https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/traces/4bf92f3577b34da6a3ce929d0e0e4736', {
  headers: {
    cookie: `__Host-sid=${process.env.IMMISCIBLE_SESSION}`,
  },
});
const data = await res.json();
console.log(res.status, data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/traces/4bf92f3577b34da6a3ce929d0e0e4736",
    headers={
        "cookie": f"__Host-sid={os.environ['IMMISCIBLE_SESSION']}",
    },
)
print(res.status_code, res.json())
```
