---
title: "Get logs"
method: GET
path: "/v1/environments/{environmentId}/logs"
tags: ["environments"]
---

# Get logs

`GET /v1/environments/{environmentId}/logs`

Get logs for an environment

## Path parameters

- `environmentId` string, required — The ID of the environment

## Query parameters

- `since` string — Start time — ISO 8601 (2024-01-01T00:00:00Z) or relative (1h, 30m, 2d)
- `until` string — End time — ISO 8601 or relative
- `limit` integer — Maximum number of log entries to return.
- `level` string[] — Filter by log level
- `search` string — Filter pattern to search for in log content
- `nextToken` string — Pagination token from a previous response

## Response `200`

The logs

- object
  - `logs` object[], required
    - `timestamp` string, date-time, required
    - `type` 'START' | 'END' | 'INFO' | 'ERROR' | 'WARNING' | 'DEBUG', required
    - `requestId` string, required
    - `content` string
    - `method` string
    - `durationInMs` number
  - `nextToken` string, nullable, required

## Other responses

- `400` — 400
- `404` — 404

---

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