---
title: "List environment logs"
method: GET
path: "/environments/{environment}/logs"
tags: ["Environments"]
---

# List environment logs

`GET /environments/{environment}/logs`

## Request

- Base URL: `https://cloud.laravel.com/api`
- URL: `https://cloud.laravel.com/api/environments/{environment}/logs`
- Auth: HTTP bearer

Get a list of logs for the given environment.

## Path parameters

- `environment` string, required

## Query parameters

- `query` string, nullable
- `type` 'all' | 'application' | 'access' | 'null', nullable
- `case_sensitive` boolean, nullable
- `whole_word` boolean, nullable
- `instances[]` string[]
- `cursor` string, nullable
- `from` string, date-time, required
- `to` string, date-time, required

## Response `200`

Array of `NormalizedLogResource`

- object
  - `data` NormalizedLogResource[], required
    - `message` string, required
    - `level` 'info' | 'warning' | 'error' | 'debug', required
    - `type` 'access' | 'application' | 'exception' | 'system', required
    - `logged_at` string, required
    - `data` union, required
      - object
        - `status` integer, required
        - `method` string, required
        - `path` string, required
        - `duration_ms` number, nullable, required
        - `bytes_sent` integer, nullable, required
        - `ip` string, nullable, required
        - `user_agent` string, nullable, required
        - `country` string, nullable, required
      - object
        - `channel` string, nullable, required
        - `context` object, nullable, required
        - `extra` object, nullable, required
      - object
        - `class` string, nullable, required
        - `code` integer, nullable, required
        - `file` string, nullable, required
        - `trace` string[], nullable, required
      - object
  - `meta` object, required
    - `cursor` string, required
    - `type` union, required
      - string
      - 'all'
    - `from` string, required
    - `to` string, required

## Other responses

- `403`: Authorization error
- `404`: Not found
- `422`: Validation error

---

[API](https://skmtc.dev/laravel/apis/laravel-cloud.md) - [All operations](https://skmtc.dev/laravel/apis/laravel-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/laravel/apis/laravel-cloud/revisions/af603f54ff33?raw)
