---
title: "Export logs to file"
method: POST
path: "/v1/logs/export"
tags: ["Logs"]
---

# Export logs to file

`POST /v1/logs/export`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/logs/export`
- Auth: HTTP bearer

Writes all log entries to a JSON file in
`~/Library/Application Support/ToolPiper/exports/`.

## Response `200`

Logs exported

- LogExportResult
  - `ok` true, required
  - `path` string, required: Absolute path to the exported file
  - `count` integer, required

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
