# List logs — GET /v1/o11y/sentinel/logs

URL: https://docs.hanzo.ai/docs/openapi/o11y/get-o11y-sentinel-logs

> Lists a project's captured error events, newest first, optionally narrowed to those whose message or exception text contains a search string.

`GET /v1/o11y/sentinel/logs`

> [O11y →](https://docs.hanzo.ai/docs/openapi/o11y) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                              |
| ------------- | -------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/o11y/sentinel/logs` |
| **Method**    | `GET`                                        |
| **Operation** | `get_o11y_sentinel_logs`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`       |

Lists a project's captured error events, newest first, optionally
narrowed to those whose message or exception text contains a search string.

## Request

4 fields.

| Field     | In    | Type    | Required | Description                                                            |
| --------- | ----- | ------- | -------- | ---------------------------------------------------------------------- |
| `project` | query | string  | yes      | Project is the project to read, as its id.                             |
| `query`   | query | string  | —        | Query narrows the page to events whose text contains it.               |
| `period`  | query | string  | —        | Period is the window to read, relative to now — 1h, 24h, 7d, 14d, 30d. |
| `limit`   | query | integer | —        | Limit caps how many events come back.                                  |

## Response

| Status    | Body             | Meaning           |
| --------- | ---------------- | ----------------- |
| `200`     | o11y.O11yLogsOut | ok                |
| `202`     | Approval         | held for approval |
| `default` | problem-details  | refused           |

`200` body — 34 fields.

| Field                            | In   | Type               | Always | Description                                                                                           |
| -------------------------------- | ---- | ------------------ | ------ | ----------------------------------------------------------------------------------------------------- |
| `data`                           | body | o11y.O11yEvents    | —      |                                                                                                       |
| `data.items`                     | body | o11y.O11yEvent\[]  | —      | Items are the events, newest first.                                                                   |
| `data.items[].culprit`           | body | string             | —      | Culprit is where it came from — the function or route blamed for it.                                  |
| `data.items[].environment`       | body | string             | —      | Environment is the deployment it happened in.                                                         |
| `data.items[].eventId`           | body | string             | —      | EventID is its own id.                                                                                |
| `data.items[].fingerprint`       | body | string             | —      | Fingerprint is the grouping key that puts like errors in one issue.                                   |
| `data.items[].frames`            | body | o11y.O11yFrame\[]  | —      | Frames are the stack, innermost first.                                                                |
| `data.items[].frames[].column`   | body | integer (uint32)   | —      | Column is the column number.                                                                          |
| `data.items[].frames[].file`     | body | string             | —      | File is the file it is in.                                                                            |
| `data.items[].frames[].function` | body | string             | —      | Function is the function the frame is in.                                                             |
| `data.items[].frames[].line`     | body | integer (uint32)   | —      | Line is the line number.                                                                              |
| `data.items[].frames[].own`      | body | boolean            | —      | Own marks a frame in the reporting application's own code rather than in a dependency or the runtime. |
| `data.items[].handled`           | body | boolean            | —      | Handled says whether the application caught it.                                                       |
| `data.items[].level`             | body | string             | —      | Level is its severity, e.g. error, warning, info.                                                     |
| `data.items[].message`           | body | string             | —      | Message is the human-readable message.                                                                |
| `data.items[].orgId`             | body | string             | —      | OrgID is the org that owns it.                                                                        |
| `data.items[].platform`          | body | string             | —      | Platform is the reporting runtime, e.g. go, python, javascript.                                       |
| `data.items[].projectId`         | body | string             | —      | ProjectID is the project it was captured for.                                                         |
| `data.items[].receivedAt`        | body | string (date-time) | —      | ReceivedAt is when it arrived here.                                                                   |
| `data.items[].release`           | body | string             | —      | Release is the version that produced it.                                                              |
| `data.items[].serverName`        | body | string             | —      | ServerName is the host that reported it.                                                              |
| `data.items[].serviceName`       | body | string             | —      | ServiceName is the service that reported it.                                                          |
| `data.items[].spanId`            | body | string             | —      | SpanID is the span it belonged to.                                                                    |
| `data.items[].tags`              | body | object             | —      | Tags are the reporter's own key/value labels.                                                         |
| `data.items[].tags.*`            | body | string             | —      |                                                                                                       |
| `data.items[].timestamp`         | body | string (date-time) | —      | Timestamp is when the error happened, as the reporter recorded it.                                    |
| `data.items[].traceId`           | body | string             | —      | TraceID is the trace it belonged to.                                                                  |
| `data.items[].transaction`       | body | string             | —      | Transaction is the operation it happened in.                                                          |
| `data.items[].type`              | body | string             | —      | Type is the exception type.                                                                           |
| `data.items[].userEmail`         | body | string             | —      | UserEmail is that user's email, when attached.                                                        |
| `data.items[].userId`            | body | string             | —      | UserID identifies the affected end user, when the reporter attached one.                              |
| `data.items[].userIp`            | body | string             | —      | UserIP is that user's address, when attached.                                                         |
| `data.items[].value`             | body | string             | —      | Value is the exception value.                                                                         |
| `status`                         | body | string             | —      | Status is "success".                                                                                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo o11y sentinel logs --project <project>
```

**SDK**

**.ts**

```ts
import { Configuration, O11yApi } from 'hanzoai';

const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getO11ySentinelLogs({ project: 'project' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).get_o11y_sentinel_logs(project='project')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.O11yAPI.GetO11ySentinelLogs(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, o11y_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = o11y_api::get_o11y_sentinel_logs(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new O11yApi(client).getO11ySentinelLogs();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/o11y/sentinel/logs?project=%3Cproject%3E \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **o11y** through the `o11y` tool, which names its 307 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_o11y_autocomplete_aggregate_attributes"
         }
       }
     }'
```

---

[O11y API](https://docs.hanzo.ai/docs/openapi/o11y) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
