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

# List app logs

> Read one of an app's logs for debugging, newest first. `kind=backend` (the default) is the backend's own output, exceptions and invocation messages; `kind=api_call` is the Effective API calls the app made, with route, status and duration. Filter by time and level, and backend logs by invocation request ID. Logs can be delayed, sampled or expired according to retention; an empty page does not prove that the app did not run.

Requires build permission on the app. Follow nextCursor with unchanged parameters. The window defaults to the last hour, is at most 24 hours, and the first page fixes it. Missing log credentials return 503; they never return a misleading empty success.

Raw request metadata, headers, bodies and environment bindings are omitted. Known credential patterns are redacted from messages, but application-written text may still contain personal or business data. Treat the response as sensitive. Read-only and safe to retry.

Alpha: this operation may change or be removed without notice.



## OpenAPI

````yaml /openapi.json get /apps/logs
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /apps/logs:
    get:
      tags:
        - Apps
      summary: List app logs
      description: >-
        Read one of an app's logs for debugging, newest first. `kind=backend`
        (the default) is the backend's own output, exceptions and invocation
        messages; `kind=api_call` is the Effective API calls the app made, with
        route, status and duration. Filter by time and level, and backend logs
        by invocation request ID. Logs can be delayed, sampled or expired
        according to retention; an empty page does not prove that the app did
        not run.


        Requires build permission on the app. Follow nextCursor with unchanged
        parameters. The window defaults to the last hour, is at most 24 hours,
        and the first page fixes it. Missing log credentials return 503; they
        never return a misleading empty success.


        Raw request metadata, headers, bodies and environment bindings are
        omitted. Known credential patterns are redacted from messages, but
        application-written text may still contain personal or business data.
        Treat the response as sensitive. Read-only and safe to retry.


        Alpha: this operation may change or be removed without notice.
      operationId: listAppLogs
      parameters:
        - schema:
            type: string
            maxLength: 63
            pattern: ^app-[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
            description: The app whose logs to read.
          required: true
          description: The app whose logs to read.
          name: appId
          in: query
        - schema:
            type: string
            enum:
              - backend
              - api_call
            default: backend
            description: >-
              `backend`: the backend’s own output, exceptions and invocation
              messages. `api_call`: the Effective API calls the app made.
          required: false
          description: >-
            `backend`: the backend’s own output, exceptions and invocation
            messages. `api_call`: the Effective API calls the app made.
          name: kind
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
            description: Maximum number of items to return (1-200).
          required: false
          description: Maximum number of items to return (1-200).
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 8192
            description: >-
              Opaque nextCursor from this operation. Repeat every other query
              parameter unchanged; a cursor from a different query returns
              invalid_cursor.
          required: false
          description: >-
            Opaque nextCursor from this operation. Repeat every other query
            parameter unchanged; a cursor from a different query returns
            invalid_cursor.
          name: cursor
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Inclusive start; defaults to one hour before until. Maximum window
              is 24 hours.
          required: false
          description: >-
            Inclusive start; defaults to one hour before until. Maximum window
            is 24 hours.
          name: since
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Inclusive end; defaults to first request time and stays fixed
              across pages.
          required: false
          description: >-
            Inclusive end; defaults to first request time and stays fixed across
            pages.
          name: until
          in: query
        - schema:
            type: string
            enum:
              - debug
              - info
              - log
              - warn
              - error
            description: >-
              For `api_call`, `error` is a 4xx or 5xx status, `warn` 3xx and
              `info` below.
          required: false
          description: >-
            For `api_call`, `error` is a 4xx or 5xx status, `warn` 3xx and
            `info` below.
          name: level
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 256
            pattern: ^[a-zA-Z0-9_-]+$
            description: Backend invocation request ID; `backend` logs only.
          required: false
          description: Backend invocation request ID; `backend` logs only.
          name: requestId
          in: query
      responses:
        '200':
          description: >-
            One page of logs. nextCursor is null when the available results are
            exhausted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2AppLogList'
        '400':
          description: Invalid request or cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: Your credential does not allow this.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: 'app_not_found: missing, archived, or not an app you can open.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: Temporarily unavailable; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2AppLogList:
      type: object
      properties:
        logs:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              at:
                type: string
                format: date-time
              level:
                type: string
              message:
                type: string
                maxLength: 4096
                description: >-
                  Credential-redacted application output; may still contain
                  sensitive application data.
              kind:
                type: string
                enum:
                  - backend
                  - api_call
              requestId:
                type: string
                nullable: true
              truncated:
                type: boolean
              apiCall:
                type: object
                nullable: true
                properties:
                  method:
                    type: string
                    description: HTTP method.
                  route:
                    type: string
                    description: The Effective API route the app called.
                  status:
                    type: integer
                    description: HTTP status Effective returned.
                  durationMs:
                    type: number
                    nullable: true
                    description: How long Effective took, or null.
                required:
                  - method
                  - route
                  - status
                  - durationMs
                additionalProperties: false
                description: The call, for `api_call` entries; null for `backend`.
            required:
              - id
              - at
              - level
              - message
              - kind
              - requestId
              - truncated
              - apiCall
            additionalProperties: false
        nextCursor:
          type: string
          nullable: true
          description: Cursor for the next page, or null on the last page.
      required:
        - logs
        - nextCursor
      additionalProperties: false
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            businessCode:
              type: string
              description: The rater’s own refusal code, for business_rejection.
            violations:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Authored or built-in constraint code
                  message:
                    type: string
                    description: Authored message for the failed constraint
                  path:
                    type: string
                    description: Input path of the offending value; empty for the request
                  value:
                    nullable: true
                    description: Offending input value, size-bounded by the runtime
                  constraint:
                    type: string
                    description: The constraint the value failed, as text
                  cite:
                    type: string
                    nullable: true
                    description: >-
                      Filing citation of the constraint, when the source cites
                      one
                required:
                  - code
                  - message
                  - path
                  - value
                  - constraint
                  - cite
                additionalProperties: false
              maxItems: 256
              description: >-
                Each input constraint the submission failed, for invalid_inputs
                and business_rejection.
            violationsTruncated:
              type: boolean
              description: >-
                True when the rater reported more violations than violations
                holds.
            executionId:
              type: string
              description: >-
                The recorded execution of a failed rating, for rater rating
                failures.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: Not currently returned.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.