> ## Documentation Index
> Fetch the complete documentation index at: https://cloud.laravel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List environment logs

> Get a list of logs for the given environment.



## OpenAPI

````yaml https://cloud.laravel.com/api-docs/api.json get /environments/{environment}/logs
openapi: 3.1.0
info:
  title: Laravel Cloud
  version: 0.0.1
servers:
  - url: https://cloud.laravel.com/api
security:
  - http: []
tags:
  - name: Applications
  - name: Environments
  - name: Domains
  - name: Commands
  - name: Deployments
  - name: Instances
  - name: Background Processes
  - name: Database Clusters
  - name: Databases
  - name: Database Snapshots
  - name: Database Restores
  - name: Object Storage Buckets
  - name: Bucket Keys
  - name: Caches
  - name: WebSocket Clusters
  - name: WebSocket Applications
  - name: Dedicated Clusters
  - name: Usage
  - name: Meta
  - name: Databases (Legacy)
paths:
  /environments/{environment}/logs:
    get:
      tags:
        - Environments
      summary: List environment logs
      description: Get a list of logs for the given environment.
      operationId: public.environments.logs.index
      parameters:
        - name: environment
          in: path
          required: true
          description: The environment identifier
          schema:
            type: string
        - name: query
          in: query
          schema:
            type:
              - string
              - 'null'
        - name: type
          in: query
          schema:
            type:
              - string
              - 'null'
            enum:
              - all
              - application
              - access
        - name: case_sensitive
          in: query
          schema:
            type:
              - boolean
              - 'null'
        - name: whole_word
          in: query
          schema:
            type:
              - boolean
              - 'null'
        - name: instances[]
          in: query
          schema:
            type: array
            items:
              type: string
        - name: cursor
          in: query
          description: >-
            Pagination cursor from a previous response. Pass this to fetch the
            next page of logs.
          schema:
            type:
              - string
              - 'null'
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Array of `NormalizedLogResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/NormalizedLogResource'
                  meta:
                    type: object
                    properties:
                      cursor:
                        type: string
                      type:
                        type: string
                      from:
                        type: string
                      to:
                        type: string
                    required:
                      - cursor
                      - type
                      - from
                      - to
                required:
                  - data
                  - meta
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    NormalizedLogResource:
      type: object
      properties:
        message:
          type: string
        level:
          type: string
          enum:
            - info
            - warning
            - error
            - debug
        type:
          type: string
          enum:
            - access
            - application
            - exception
            - system
        logged_at:
          type: string
        data:
          anyOf:
            - type: object
              properties:
                status:
                  type: integer
                method:
                  type: string
                path:
                  type: string
                duration_ms:
                  type:
                    - number
                    - 'null'
                bytes_sent:
                  type:
                    - integer
                    - 'null'
                ip:
                  type:
                    - string
                    - 'null'
                user_agent:
                  type:
                    - string
                    - 'null'
                country:
                  type:
                    - string
                    - 'null'
              required:
                - status
                - method
                - path
                - duration_ms
                - bytes_sent
                - ip
                - user_agent
                - country
            - type: object
              properties:
                channel:
                  type:
                    - string
                    - 'null'
                context:
                  type:
                    - object
                    - 'null'
                  additionalProperties: {}
                extra:
                  type:
                    - object
                    - 'null'
                  additionalProperties: {}
              required:
                - channel
                - context
                - extra
            - type: object
              properties:
                class:
                  type:
                    - string
                    - 'null'
                code:
                  type:
                    - integer
                    - 'null'
                file:
                  type:
                    - string
                    - 'null'
                trace:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
              required:
                - class
                - code
                - file
                - trace
            - type: object
              additionalProperties: {}
            - type: 'null'
      required:
        - message
        - level
        - type
        - logged_at
        - data
      title: NormalizedLogResource
  responses:
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: The Bearer Token generated on the Cloud UI.
      scheme: bearer
      bearerFormat: bearer

````