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

# Query

> Runtime logs for the project's deployed app; 7-day retention. Returns the most recent matching entries, oldest first. The window defaults to the last hour.



## OpenAPI

````yaml /openapi.json get /v1/orgs/{orgId}/projects/{projectId}/logs
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/logs:
    get:
      tags:
        - logs
      summary: Query
      description: >-
        Runtime logs for the project's deployed app; 7-day retention. Returns
        the most recent matching entries, oldest first. The window defaults to
        the last hour.
      operationId: logs.query
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Only entries at or after this time (RFC 3339). Defaults to one hour
            before until.
        - name: until
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Only entries at or before this time (RFC 3339). Defaults to now.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Maximum entries returned, 1-500. Defaults to 100.
        - name: level
          in: query
          required: false
          schema:
            type: string
            enum:
              - info
              - warn
              - error
              - debug
          description: Only entries at this level.
        - name: search
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 256
          description: >-
            Case-insensitive literal substring to find in log messages, between
            1 and 256 characters.
        - name: environment
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z][a-z0-9-]{0,38}$
          description: >-
            Environment slug to scope this operation to. Defaults to
            "production". An environment that does not exist on the project
            answers 404. Runtime logs are isolated to the addressed
            environment's app. The implicit preview environment has no single
            runtime stream.
      responses:
        '200':
          description: Log entries, oldest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          format: date-time
                        level:
                          type: string
                          enum:
                            - info
                            - warn
                            - error
                            - debug
                        message:
                          type: string
                        source:
                          type: string
                          enum:
                            - app
                            - platform
                          description: >-
                            Whether the app emitted the line or the platform
                            did.
                      required:
                        - timestamp
                        - level
                        - message
                        - source
                  note:
                    type: string
                    description: >-
                      Present when there is context worth surfacing — for
                      example the project has no runtime yet because nothing was
                      deployed.
                required:
                  - entries
        '404':
          description: No such project or environment in this organization.
        '422':
          description: Invalid since, until, limit, level, or search.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````