---
title: "Get service logs"
method: GET
path: "/v1/logs"
tags: ["logs"]
---

# Get service logs

`GET /v1/logs`

Successful fetch previously-written logs from the given services,
or request logs from the given services and follows them, in JSON lines format.

Example:

```
{"time":"2024-12-31T02:11:09.361Z","service":"svc1","message":" * Serving Flask app 'main'"}
{"time":"2024-12-31T02:11:09.361Z","service":"svc1","message":" * Debug mode: off"}
{"time":"2024-12-31T02:11:09.382Z","service":"svc1","message":" * Running on http://127.0.0.1:5000"}
```

## Query parameters

- `services` string
- `follow` 'true' | 'false'
- `n` integer

## Response `200`

Service logs in JSON lines format.

## Changes

> 12 revisions in range; 1 could not be searched.

- **2025-01-13** `20135041d803` — 3 info
  - api tag `logs` added
  - api tag `services` removed
  - for the `query` request parameter `n`, the type/format was generalized from `integer`/`int32` to `integer`/``
- **2025-01-02** `1cb37312be6c` — 1 info
  - endpoint added
- **2024-12-22** `b3903318c3bd` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/canonical/apis/pebble-api/changes/v1/logs/get.md)

---

[API](https://skmtc.dev/canonical/apis/pebble-api.md) · [All operations](https://skmtc.dev/canonical/apis/pebble-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/canonical/pebble-api/revisions/a94f353eccac/schema)
